Amything 131 Posted June 1, 2025 Posted June 1, 2025 Hey, I made an IRemoveImageProvider. Simplified code: public class PosterImageProvider : IRemoteImageProvider { public string Name => PluginConfig.Name; public Task<HttpResponseInfo> GetImageResponse(string url, CancellationToken cancellationToken) { // No remote fetching, just return null or a dummy response if required return Task.FromResult<HttpResponseInfo>(null); } public Task<IEnumerable<RemoteImageInfo>> GetImages(BaseItem item, LibraryOptions libraryOptions, CancellationToken cancellationToken) { List<RemoteImageInfo> images = new List<RemoteImageInfo>(); if (item is BoxSet == false) { return Task.FromResult<IEnumerable<RemoteImageInfo>>(images); } // Not included, I have a check if the collection belongs to my plugin and has a poster images.Add(new RemoteImageInfo { Type = ImageType.Primary, ProviderName = Name, Url = string.Format(PluginConfig.ImageUrlTemplate, acdbCollectionId) // Not included, I get the id from plugin config }); return Task.FromResult<IEnumerable<RemoteImageInfo>>(images); } public IEnumerable<ImageType> GetSupportedImages(BaseItem item) { // Only support primary images return new[] { ImageType.Primary }; } public bool Supports(BaseItem item) { // Only support boxsets return item is BoxSet; } } First problem: Tested on 3 different servers. Create a collection, just manually inside Emby and call it "Anime" Result: it gets assigned an External ID for MovieDB, 535790. Can also try collection "Concerts" and it also gets automatically assigned MovieDb with another ID. This doesn't seem to make much sense? Especially considering that collection is called Anime has a Godzilla ID assigned. Do a metadata refresh for images on these collections and you get a poster from MovieDb. This will override my own RemoteImageProvider on one server, but not another. Why might that be? Can this priority be controlled somehow? Related question: I store the id of the poster in a config file and not an External ID. Is creating an external id provider a more proper way to go about it? Might I get more priority then? Another problem, only for a few users, which may or may not be related to other plugins installed. My RemoteImageProvider does not get called at all for any collection, my log statements at top of GetImage is not present in the logs. No errors or anything. I see Covert Art and Fan Art log statements on image metadata refreshing nothing for my RemoteImageProvider. I have not been able to reproduce this for myself even though I installed these plugins, so I'm pretty stumped. Any ideas?
Luke 42255 Posted June 1, 2025 Posted June 1, 2025 Quote Can this priority be controlled somehow? Not from the plugin, only from the settings of the library.
Luke 42255 Posted June 1, 2025 Posted June 1, 2025 Quote Another problem, only for a few users, which may or may not be related to other plugins installed. My RemoteImageProvider does not get called at all for any collection, my log statements at top of GetImage is not present in the logs. No errors or anything. I see Covert Art and Fan Art log statements on image metadata refreshing nothing for my RemoteImageProvider. I have not been able to reproduce this for myself even though I installed these plugins, so I'm pretty stumped. Any ideas? I would check the collections library to see what fetchers are enabled.
Amything 131 Posted June 1, 2025 Author Posted June 1, 2025 5 minutes ago, Luke said: Not from the plugin, only from the settings of the library. Oh wow, never noticed those settings, thank you. 1
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