|
|
@ -104,12 +104,12 @@ namespace NzbDrone.Core.Extras.Metadata
|
|
|
|
files.AddIfNotNull(ProcessArtistMetadata(consumer, artist, consumerFiles));
|
|
|
|
files.AddIfNotNull(ProcessArtistMetadata(consumer, artist, consumerFiles));
|
|
|
|
files.AddRange(ProcessArtistImages(consumer, artist, consumerFiles));
|
|
|
|
files.AddRange(ProcessArtistImages(consumer, artist, consumerFiles));
|
|
|
|
|
|
|
|
|
|
|
|
var albumGroups = trackFiles.GroupBy(s => Path.GetDirectoryName(s.Path)).ToList();
|
|
|
|
var albumGroups = trackFiles.GroupBy(s => s.AlbumId).ToList();
|
|
|
|
|
|
|
|
|
|
|
|
foreach (var group in albumGroups)
|
|
|
|
foreach (var group in albumGroups)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
var album = _albumService.GetAlbum(group.First().AlbumId);
|
|
|
|
var album = _albumService.GetAlbum(group.Key);
|
|
|
|
var albumFolder = group.Key;
|
|
|
|
var albumFolder = Path.GetDirectoryName(group.First().Path);
|
|
|
|
files.AddIfNotNull(ProcessAlbumMetadata(consumer, artist, album, albumFolder, consumerFiles));
|
|
|
|
files.AddIfNotNull(ProcessAlbumMetadata(consumer, artist, album, albumFolder, consumerFiles));
|
|
|
|
files.AddRange(ProcessAlbumImages(consumer, artist, album, albumFolder, consumerFiles));
|
|
|
|
files.AddRange(ProcessAlbumImages(consumer, artist, album, albumFolder, consumerFiles));
|
|
|
|
|
|
|
|
|
|
|
@ -159,6 +159,12 @@ namespace NzbDrone.Core.Extras.Metadata
|
|
|
|
files.AddIfNotNull(ProcessArtistMetadata(consumer, artist, consumerFiles));
|
|
|
|
files.AddIfNotNull(ProcessArtistMetadata(consumer, artist, consumerFiles));
|
|
|
|
files.AddRange(ProcessArtistImages(consumer, artist, consumerFiles));
|
|
|
|
files.AddRange(ProcessArtistImages(consumer, artist, consumerFiles));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (albumFolder.IsNotNullOrWhiteSpace())
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
files.AddIfNotNull(ProcessAlbumMetadata(consumer, artist, album, albumFolder, consumerFiles));
|
|
|
|
|
|
|
|
files.AddRange(ProcessAlbumImages(consumer, artist, album, albumFolder, consumerFiles));
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
_metadataFileService.Upsert(files);
|
|
|
|
_metadataFileService.Upsert(files);
|
|
|
|