Question about image caching
#1
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!
BBC Live Football Scores: Football scores notifications service.
script.squeezeinfo: shows what's playing on your Logitech Media Server
Reply
#2
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
Do not PM or e-mail Team-Kodi members directly asking for support.
Always read the Forum rules, Kodi online-manual, FAQ, Help and Search the forum before posting.
Reply
#3
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.
BBC Live Football Scores: Football scores notifications service.
script.squeezeinfo: shows what's playing on your Logitech Media Server
Reply
#4
Moved as requested
|Banned add-ons (wiki)|Forum rules (wiki)|VPN policy (wiki)|First time user (wiki)|FAQs (wiki) Troubleshooting (wiki)|Add-ons (wiki)|Free content (wiki)|Debug Log (wiki)|

Kodi Blog Posts
Reply
#5
hi el_Paraguayo,

are you using PIL to do the image manipulation?
Reply
#6
Yes.
BBC Live Football Scores: Football scores notifications service.
script.squeezeinfo: shows what's playing on your Logitech Media Server
Reply

Logout Mark Read Team Forum Stats Members Help
Question about image caching0