Release 1.0.0.12: genre normalization and album organization
This commit is contained in:
1 parent
4bb222af8b
commit
7106023d49
11 files changed
+301
-17
No files matched your search
@@ -73,13 +73,12 @@ public class YandexMusicAudioCustomProvider : ICustomMetadataProvider<Audio>
|
||||
}
|
||||
}
|
||||
|
||||
if (GenreCache.TryGet(item.Path, out var genres) && genres.Length > 0)
|
||||
var sourceGenres = GenreCache.TryGet(item.Path, out var cachedGenres) && cachedGenres.Length > 0
|
||||
? cachedGenres
|
||||
: item.Genres;
|
||||
if (sourceGenres.Length > 0)
|
||||
{
|
||||
var distinctGenres = genres
|
||||
.Select(g => g.Trim())
|
||||
.Where(g => g.Length > 0)
|
||||
.Distinct(StringComparer.OrdinalIgnoreCase)
|
||||
.ToArray();
|
||||
var distinctGenres = GenreNameMap.NormalizeAll(sourceGenres);
|
||||
if (!distinctGenres.SequenceEqual(item.Genres, StringComparer.OrdinalIgnoreCase))
|
||||
{
|
||||
item.Genres = distinctGenres;
|
||||
|
||||
Reference in new issue
Block a user