Jump to content

C# checking for artists ?


mickle026

Recommended Posts

mickle026

I am checking for Actors like this

        public bool Supports(BaseItem item)
        {
            return item is Person;
        }

        public IEnumerable<ImageType> GetSupportedImages(BaseItem item)
        {
            return new List<ImageType>
            {
                ImageType.Primary
            };
        }

        public Task<HttpResponseInfo> GetImageResponse(string url, CancellationToken cancellationToken)
        {
            return _httpClient.GetResponse(new HttpRequestOptions
            {
                CancellationToken = cancellationToken,
                Url = url
            });
        }
        public Task<IEnumerable<RemoteImageInfo>> GetImages(BaseItem item, LibraryOptions libraryOptions, CancellationToken cancellationToken)
        {
            logger.Info($"BaseItem: {item.Name}", null);
            return GetImages(item, cancellationToken);
        }

However I want to trigger this also on artist images (ie the artist person image), and it isn't happening, the remote image info is not triggered.  There is nothing in the log to say this routine even entered.  So im guessing Artists cannot be looked up directly via their ID's and have to looked up via the album ?

 

I have tried adding the Audio Entity and item MusicArtists too

using MediaBrowser.Controller.Entities.Audio;


        public bool Supports(BaseItem item)
        {
            return item is Person || item is MusicArtist;
        }

Or is there a way to do this?

Edited by mickle026
Link to comment
Share on other sites

mickle026

Forget I asked I had figured it out, just not enabled it in the library settings ..... a duh moment!

  • Thanks 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...