| | 1 | | #pragma warning disable CS1591 |
| | 2 | |
|
| | 3 | | using System; |
| | 4 | | using System.Collections.Generic; |
| | 5 | | using MediaBrowser.Common.Configuration; |
| | 6 | | using MediaBrowser.Controller.Drawing; |
| | 7 | | using MediaBrowser.Controller.Entities; |
| | 8 | | using MediaBrowser.Controller.Entities.Audio; |
| | 9 | | using MediaBrowser.Controller.Providers; |
| | 10 | | using MediaBrowser.Model.IO; |
| | 11 | |
|
| | 12 | | namespace Emby.Server.Implementations.Images |
| | 13 | | { |
| | 14 | | /// <summary> |
| | 15 | | /// Class ArtistImageProvider. |
| | 16 | | /// </summary> |
| | 17 | | public class ArtistImageProvider : BaseDynamicImageProvider<MusicArtist> |
| | 18 | | { |
| | 19 | | public ArtistImageProvider(IFileSystem fileSystem, IProviderManager providerManager, IApplicationPaths applicati |
| 21 | 20 | | : base(fileSystem, providerManager, applicationPaths, imageProcessor) |
| | 21 | | { |
| 21 | 22 | | } |
| | 23 | |
|
| | 24 | | /// <summary> |
| | 25 | | /// Get children objects used to create an artist image. |
| | 26 | | /// </summary> |
| | 27 | | /// <param name="item">The artist used to create the image.</param> |
| | 28 | | /// <returns>Any relevant children objects.</returns> |
| | 29 | | protected override IReadOnlyList<BaseItem> GetItemsWithImages(BaseItem item) |
| | 30 | | { |
| 0 | 31 | | return Array.Empty<BaseItem>(); |
| | 32 | |
|
| | 33 | | // TODO enable this when BaseDynamicImageProvider objects are configurable |
| | 34 | | // return _libraryManager.GetItemList(new InternalItemsQuery |
| | 35 | | // { |
| | 36 | | // ArtistIds = new[] { item.Id }, |
| | 37 | | // IncludeItemTypes = new[] { nameof(MusicAlbum) }, |
| | 38 | | // OrderBy = new[] { (ItemSortBy.Random, SortOrder.Ascending) }, |
| | 39 | | // Limit = 4, |
| | 40 | | // Recursive = true, |
| | 41 | | // ImageTypes = new[] { ImageType.Primary }, |
| | 42 | | // DtoOptions = new DtoOptions(false) |
| | 43 | | // }); |
| | 44 | | } |
| | 45 | | } |
| | 46 | | } |