Kodi Community Forum

Full Version: Question about image caching
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I have a service addon that downloads some images from the web but, rather than displaying them directly, the addon does some manipulation of the downloaded image and then saves the result as a new image which it then displays.

In that scenario, will Kodi still cache the original images that I download (i.e. by remembering the addresses) or I need to implement a cache myself? I'm very happy to do the latter but I'd rather not write code unnecessarily!
depending on the method you use to display the image, caching can be disabled.
http://mirrors.xbmc.org/docs/python-docs...e-setImage

not sure if this applies to your addon though
Thanks Ronie.

I think that suggests that if I passed a URL directly as then Kodi would cache it. However, as I'm downloading within the addon and doing some additional processing, I don't think my original request would get cached.

That's fine, I'll add a simple caching function into my addon to limit the web requests I need to make.


PS Just noticed I didn't post this in the "development" sub-forum, can a mod please move it if they see this.
Moved as requested
hi el_Paraguayo,

are you using PIL to do the image manipulation?
Yes.