mickle026 404 Posted January 23, 2022 Share Posted January 23, 2022 Hi, Is it possible to get the image type requested in a fetcher, instead of fetching them all for every request? I have two places where it could be gleemed from but have no idea how to query the ImageType requested when the plugin is called public Task<IEnumerable<RemoteImageInfo>> GetImages(BaseItem item, LibraryOptions libraryOptions, CancellationToken cancellationToken) or the Async public async Task<IEnumerable<RemoteImageInfo>> GetImages(BaseItem item, CancellationToken cancellationToken) I don't see it in BaseItem or LibraryOptions to get the request type, its probably there , but where?? I would really be able to do something like this (test which image type is requested) with ImageType, but item is always MusicArtist, Movie, MusicAlbum, Person etc if (item.GetType() == typeof(ImageType.Primary)) Many thanks for helping the clueless Link to comment Share on other sites More sharing options...
Luke 37247 Posted January 24, 2022 Share Posted January 24, 2022 Hi, no, you're supposed to send back all of them and then the server will filter in the core. Link to comment Share on other sites More sharing options...
mickle026 404 Posted January 24, 2022 Author Share Posted January 24, 2022 1 hour ago, Luke said: Hi, no, you're supposed to send back all of them and then the server will filter in the core. Thats fine, However when you swap from Primary to Logo , Backdrop etc its fetching them all again each individual time, so thats a waste of resources and remote server requests as it already has them so I wanted to them individually as the user requests the ImageType. I suppose the next question is, Is the server supposed to be doing this i.e, retriggering the GetImages everytime a search icon is pressed if its done them all the first time - whilst the edit images dialog is still open ? - it seems odd... Link to comment Share on other sites More sharing options...
Luke 37247 Posted January 24, 2022 Share Posted January 24, 2022 The server doesn't do any caching for this. It's up to the provider to do that if needed. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now