|
|
|
@ -212,12 +212,11 @@ namespace MediaBrowser.Providers.Music
|
|
|
|
|
await DownloadArtistXml(artistDataPath, musicBrainzId, cancellationToken).ConfigureAwait(false);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (!item.LockedFields.Contains(MetadataFields.Images) &&
|
|
|
|
|
(ConfigurationManager.Configuration.DownloadMusicArtistImages.Art ||
|
|
|
|
|
if (ConfigurationManager.Configuration.DownloadMusicArtistImages.Art ||
|
|
|
|
|
ConfigurationManager.Configuration.DownloadMusicArtistImages.Backdrops ||
|
|
|
|
|
ConfigurationManager.Configuration.DownloadMusicArtistImages.Banner ||
|
|
|
|
|
ConfigurationManager.Configuration.DownloadMusicArtistImages.Logo ||
|
|
|
|
|
ConfigurationManager.Configuration.DownloadMusicArtistImages.Primary))
|
|
|
|
|
ConfigurationManager.Configuration.DownloadMusicArtistImages.Primary)
|
|
|
|
|
{
|
|
|
|
|
var images = await _providerManager.GetAvailableRemoteImages(item, cancellationToken, ManualFanartArtistProvider.ProviderName).ConfigureAwait(false);
|
|
|
|
|
await FetchFromXml(item, images.ToList(), cancellationToken).ConfigureAwait(false);
|
|
|
|
@ -267,6 +266,8 @@ namespace MediaBrowser.Providers.Music
|
|
|
|
|
/// <param name="cancellationToken">The cancellation token.</param>
|
|
|
|
|
/// <returns>Task.</returns>
|
|
|
|
|
private async Task FetchFromXml(BaseItem item, List<RemoteImageInfo> images , CancellationToken cancellationToken)
|
|
|
|
|
{
|
|
|
|
|
if (!item.LockedFields.Contains(MetadataFields.Images))
|
|
|
|
|
{
|
|
|
|
|
cancellationToken.ThrowIfCancellationRequested();
|
|
|
|
|
|
|
|
|
@ -295,7 +296,10 @@ namespace MediaBrowser.Providers.Music
|
|
|
|
|
{
|
|
|
|
|
await SaveImage(item, images, ImageType.Banner, cancellationToken).ConfigureAwait(false);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (!item.LockedFields.Contains(MetadataFields.Backdrops))
|
|
|
|
|
{
|
|
|
|
|
cancellationToken.ThrowIfCancellationRequested();
|
|
|
|
|
|
|
|
|
|
var backdropLimit = ConfigurationManager.Configuration.MaxBackdrops;
|
|
|
|
@ -311,6 +315,7 @@ namespace MediaBrowser.Providers.Music
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private async Task SaveImage(BaseItem item, List<RemoteImageInfo> images, ImageType type, CancellationToken cancellationToken)
|
|
|
|
|
{
|
|
|
|
|