Allow skins to cache a web image (1 Viewer)

Status
Not open for further replies.

Blue Lightning

Portal Member
October 8, 2011
49
52
Home Country
Australia Australia
Here's a patch to allow skins to display images from the internet without re-downloading that same image each time MP is started. The image is only redownloaded if it has been deleted (which happens automatically if the image has not been used by any skin for 72 hours). The feature is completely optional and skins don't need to use it, as the existing temporary method (clearing the cached file on MP close) is still default.


Patch for MediaPortal guilib: http://pastebin.com/u1GBVUuf

Documentation: Skins can include attribute 'save' on the texture element eg <texture save="yes">#TV.Example.Logo</texture> or <texture save="yes">https://example.com/example.png</texture> to force the downloaded file to be saved locally. Files unused for 3 days are deleted. Excluding the 'save' parameter uses the temporary save method that is in the release version of MediaPortal.

Bug fixes: (this fixes two existing bugs in MP's guilib)
png images were being saved as gif. now they're saved as png, skipping gif frame-finding code (possibly improving performance)
only http images could be downloaded before, now https can too.
 

Blue Lightning

Portal Member
October 8, 2011
49
52
Home Country
Australia Australia
Yes, the patch (in the first post and web image.patch) includes the fixes (png, https) and the feature (skin save="yes"). It'd be great to have it added :)
 
Status
Not open for further replies.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Top Bottom