diff options
Diffstat (limited to 'MediaBrowser.Controller/Providers/Music/FanArtAlbumProvider.cs')
| -rw-r--r-- | MediaBrowser.Controller/Providers/Music/FanArtAlbumProvider.cs | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/MediaBrowser.Controller/Providers/Music/FanArtAlbumProvider.cs b/MediaBrowser.Controller/Providers/Music/FanArtAlbumProvider.cs index 15188bc69d..8c92ea025f 100644 --- a/MediaBrowser.Controller/Providers/Music/FanArtAlbumProvider.cs +++ b/MediaBrowser.Controller/Providers/Music/FanArtAlbumProvider.cs @@ -116,16 +116,22 @@ namespace MediaBrowser.Controller.Providers.Music { cancellationToken.ThrowIfCancellationRequested(); - var releaseGroupId = await GetReleaseGroupId(item.GetProviderId(MetadataProviders.Musicbrainz), cancellationToken).ConfigureAwait(false); + var album = (MusicAlbum)item; - if (string.IsNullOrEmpty(releaseGroupId)) + if (string.IsNullOrEmpty(album.MusicBrainzReleaseGroupId)) + { + album.MusicBrainzReleaseGroupId = await GetReleaseGroupId(item.GetProviderId(MetadataProviders.Musicbrainz), cancellationToken).ConfigureAwait(false); + } + + // If still empty there's nothing more we can do + if (string.IsNullOrEmpty(album.MusicBrainzReleaseGroupId)) { SetLastRefreshed(item, DateTime.UtcNow); return true; } - var url = string.Format("http://api.fanart.tv/webservice/album/{0}/{1}/xml/all/1/1", APIKey, releaseGroupId); + var url = string.Format("http://api.fanart.tv/webservice/album/{0}/{1}/xml/all/1/1", APIKey, album.MusicBrainzReleaseGroupId); var doc = new XmlDocument(); |
