| | 1 | | #pragma warning disable CS1591 |
| | 2 | |
|
| | 3 | | using System.Collections.Generic; |
| | 4 | | using System.Collections.Immutable; |
| | 5 | | using MediaBrowser.Controller.Configuration; |
| | 6 | | using MediaBrowser.Controller.Entities; |
| | 7 | | using MediaBrowser.Controller.Entities.Audio; |
| | 8 | | using MediaBrowser.Controller.Library; |
| | 9 | | using MediaBrowser.Controller.Providers; |
| | 10 | | using MediaBrowser.Model.IO; |
| | 11 | | using MediaBrowser.Providers.Manager; |
| | 12 | | using Microsoft.Extensions.Logging; |
| | 13 | |
|
| | 14 | | namespace MediaBrowser.Providers.Music |
| | 15 | | { |
| | 16 | | public class ArtistMetadataService : MetadataService<MusicArtist, ArtistInfo> |
| | 17 | | { |
| | 18 | | public ArtistMetadataService( |
| | 19 | | IServerConfigurationManager serverConfigurationManager, |
| | 20 | | ILogger<ArtistMetadataService> logger, |
| | 21 | | IProviderManager providerManager, |
| | 22 | | IFileSystem fileSystem, |
| | 23 | | ILibraryManager libraryManager) |
| 21 | 24 | | : base(serverConfigurationManager, logger, providerManager, fileSystem, libraryManager) |
| | 25 | | { |
| 21 | 26 | | } |
| | 27 | |
|
| | 28 | | /// <inheritdoc /> |
| 0 | 29 | | protected override bool EnableUpdatingGenresFromChildren => true; |
| | 30 | |
|
| | 31 | | /// <inheritdoc /> |
| | 32 | | protected override IReadOnlyList<BaseItem> GetChildrenForMetadataUpdates(MusicArtist item) |
| | 33 | | { |
| 0 | 34 | | return item.IsAccessedByName |
| 0 | 35 | | ? item.GetTaggedItems(new InternalItemsQuery |
| 0 | 36 | | { |
| 0 | 37 | | Recursive = true, |
| 0 | 38 | | IsFolder = false |
| 0 | 39 | | }) |
| 0 | 40 | | : item.GetRecursiveChildren(i => i is IHasArtist && !i.IsFolder); |
| | 41 | | } |
| | 42 | | } |
| | 43 | | } |