diff options
| author | Joshua M. Boniface <joshua@boniface.me> | 2025-08-03 17:27:17 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-08-03 17:27:17 -0400 |
| commit | 4b6fb6c4bb2478badad068ce18aabe0c2955db48 (patch) | |
| tree | 15f986ee62327cceb8f5c8f009bcf08d10cfaa66 /MediaBrowser.Providers/Plugins/AudioDb/AudioDbArtistImageProvider.cs | |
| parent | e7bc86ebb8496615e0b3f73eb4f13ab4c0913dc8 (diff) | |
| parent | db7465e83d9cc07134a0bffad7ed17b1c7b873da (diff) | |
Merge branch 'master' into master
Diffstat (limited to 'MediaBrowser.Providers/Plugins/AudioDb/AudioDbArtistImageProvider.cs')
| -rw-r--r-- | MediaBrowser.Providers/Plugins/AudioDb/AudioDbArtistImageProvider.cs | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/MediaBrowser.Providers/Plugins/AudioDb/AudioDbArtistImageProvider.cs b/MediaBrowser.Providers/Plugins/AudioDb/AudioDbArtistImageProvider.cs index 4e7757cd2..88730f34d 100644 --- a/MediaBrowser.Providers/Plugins/AudioDb/AudioDbArtistImageProvider.cs +++ b/MediaBrowser.Providers/Plugins/AudioDb/AudioDbArtistImageProvider.cs @@ -4,7 +4,6 @@ using System.Collections.Generic; using System.IO; -using System.Linq; using System.Net.Http; using System.Text.Json; using System.Threading; @@ -43,21 +42,19 @@ namespace MediaBrowser.Providers.Plugins.AudioDb /// <inheritdoc /> public IEnumerable<ImageType> GetSupportedImages(BaseItem item) { - return new ImageType[] - { + return + [ ImageType.Primary, ImageType.Logo, ImageType.Banner, ImageType.Backdrop - }; + ]; } /// <inheritdoc /> public async Task<IEnumerable<RemoteImageInfo>> GetImages(BaseItem item, CancellationToken cancellationToken) { - var id = item.GetProviderId(MetadataProvider.MusicBrainzArtist); - - if (!string.IsNullOrWhiteSpace(id)) + if (item.TryGetProviderId(MetadataProvider.MusicBrainzArtist, out var id)) { await AudioDbArtistProvider.Current.EnsureArtistInfo(id, cancellationToken).ConfigureAwait(false); @@ -75,7 +72,7 @@ namespace MediaBrowser.Providers.Plugins.AudioDb } } - return Enumerable.Empty<RemoteImageInfo>(); + return []; } private List<RemoteImageInfo> GetImages(AudioDbArtistProvider.Artist item) |
