Prevent image caching?
#1
I'm writing my first program plug-in and have hit a problem with the fact that the images I pass to xbmc thru a list item with addDirectoryItem are being cached

The images are of the form "http://192.168.1.2:8080/xbmc.bmp?floor=1&room=8"

It gets the images ok but it then caches them. The problem with this is that the images are dynamically generated and always different, so I don't want it to cache them

Is there anyway to prevent this caching please?

My only thought is to put a random parameter in the url, but this would mean it caching every version of the image even though they would never be used again (assuming that would even work)

Thanks
Tony
Reply
#2
Caching is you friend. Think hard about whether you really need to bypass it, as in dharma the cache is now pretty intelligent and will expire after 24 hours. It generally does the right thing.

That said, if you really need to bypass it you will need to download the files using urllib (or whatever, but you will need to download them yourself in code) and store the files within the userdata/thumbnails/whatever folder. If you store them there xbmc will not try to cache them. I don't guarantee this will work going forward, but it does work currently.
Reply
#3
galvanash Wrote:Caching is you friend. Think hard about whether you really need to bypass it, as in dharma the cache is now pretty intelligent and will expire after 24 hours. It generally does the right thing.

That said, if you really need to bypass it you will need to download the files using urllib (or whatever, but you will need to download them yourself in code) and store the files within the userdata/thumbnails/whatever folder. If you store them there xbmc will not try to cache them. I don't guarantee this will work going forward, but it does work currently.

Many thanks, didn't think of doing it that way
Reply
#4
galvanash Wrote:Caching is you friend. Think hard about whether you really need to bypass it, as in dharma the cache is now pretty intelligent and will expire after 24 hours. It generally does the right thing.

That said, if you really need to bypass it you will need to download the files using urllib (or whatever, but you will need to download them yourself in code) and store the files within the userdata/thumbnails/whatever folder. If you store them there xbmc will not try to cache them. I don't guarantee this will work going forward, but it does work currently.

I know this is an old post but just trying to get some answers. If you pass a picture from the web lets say http://www.test.com/picture.jpg

and you are passing it like this:
addDir(name,url,mode,picture)
where picture="http://www.test.com/picture.jpg"

you will only download it if you stay ontop of that particular item(assuming you have thousands of items scraped from the video page) and store the thumb for 24 hours and tomorrow it will try to redownload tomorrow? is that correct?

if you have thousands of items scrapped will it try to download every picture or just the ones you scroll down?
Reply

Logout Mark Read Team Forum Stats Members Help
Prevent image caching?0