Allow skins to cache a web image

Discussion in 'Submit: code patches (MediaPortal/TV-Server/etc.)' started by Blue Lightning, January 9, 2017.

Thread Status:
Not open for further replies.
  1. Blue Lightning

    Blue Lightning Portal Member

    Joined:
    October 8, 2011
    Messages:
    49
    Likes Received:
    26
    Ratings:
    +43 / 0
    Home Country:
    Australia Australia
    Show System Specs
    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.
     
    • Thank You! Thank You! x 4
    • Like Like x 1
  2. Google AdSense Guest Advertisement



    to hide all adverts.
  3. Blue Lightning

    Blue Lightning Portal Member

    Joined:
    October 8, 2011
    Messages:
    49
    Likes Received:
    26
    Ratings:
    +43 / 0
    Home Country:
    Australia Australia
    Show System Specs
    Anything I can do to help get this added?
     
    • Thank You! Thank You! x 1
  4. azzuro
    • Team MediaPortal

    azzuro Test Group

    Joined:
    May 10, 2007
    Messages:
    8,520
    Likes Received:
    2,566
    Occupation:
    technician HVAC
    Location:
    France - IDF
    Ratings:
    +4,251 / 13
    Home Country:
    France France
    Show System Specs
  5. Sebastiii
    • Team MediaPortal

    Sebastiii Development Group

    Joined:
    November 12, 2007
    Messages:
    16,296
    Likes Received:
    6,248
    Gender:
    Male
    Location:
    France
    Ratings:
    +10,269 / 9
    Home Country:
    France France
    Show System Specs
    It is possible to create a patch, we can create a Jira for it for sure :)
     
    • Like Like x 1
    • Thank You! Thank You! x 1
  6. azzuro
    • Team MediaPortal

    azzuro Test Group

    Joined:
    May 10, 2007
    Messages:
    8,520
    Likes Received:
    2,566
    Occupation:
    technician HVAC
    Location:
    France - IDF
    Ratings:
    +4,251 / 13
    Home Country:
    France France
    Show System Specs
    @Blue Lightning
    the link provided on 1st post, includ the fix ?
    if yes, the patch provided on this post, is the good one.
     

    Attached Files:

    • Thank You! Thank You! x 2
    • Like Like x 1
  7. Blue Lightning

    Blue Lightning Portal Member

    Joined:
    October 8, 2011
    Messages:
    49
    Likes Received:
    26
    Ratings:
    +43 / 0
    Home Country:
    Australia Australia
    Show System Specs
    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 :)
     
    • Like Like x 3
  8. azzuro
    • Team MediaPortal

    azzuro Test Group

    Joined:
    May 10, 2007
    Messages:
    8,520
    Likes Received:
    2,566
    Occupation:
    technician HVAC
    Location:
    France - IDF
    Ratings:
    +4,251 / 13
    Home Country:
    France France
    Show System Specs
  9. Blue Lightning

    Blue Lightning Portal Member

    Joined:
    October 8, 2011
    Messages:
    49
    Likes Received:
    26
    Ratings:
    +43 / 0
    Home Country:
    Australia Australia
    Show System Specs
Loading...
Thread Status:
Not open for further replies.

Users Viewing Thread (Users: 0, Guests: 0)

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice
  • About The Project

    The vision of the MediaPortal project is to create a free open source media centre application, which supports all advanced media centre functions, and is accessible to all Windows users.

    In reaching this goal we are working every day to make sure our software is one of the best.

             

  • Support MediaPortal!

    The team works very hard to make sure the community is running the best HTPC-software. We give away MediaPortal for free but hosting and software is not for us.

    Care to support our work with a few bucks? We'd really appreciate it!