[EPG] - Use data-provided value for #TV.Guide.thumb texture?

Discussion in 'Improvement Suggestions' started by Blue Lightning, September 7, 2016.

  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
    Summary:
    Have #TV.Guide.thumb use a provided program-specific image if available

    Area:
    TV Guide / xmlTV

    Description:

    Currently #TV.Guide.thumb defaults to "defaultVideoBig.png". Then if that program's channel has an image it'll use that image (mpdirectory/thumbs/tv/logos/CHANNEL.png). It would be nice if this value could also check the TV Guide data, and if an "<icon>" is provided with a "src" attribute, set that URL (or local/network path) as the image. So priority order would be: (highest to lowest) Data-provided image URL/path for this specific airing, channel image for the channel the airing is on, defaultVideoBig.png
    (I'm unsure if MediaPortal's built-in thumbnailer from the video file also hooks into #TV.Guide.thumb but in my opinion the priority order there would be: Data-provided image URL, MP generated thumb from video file, channel image, defaultVideoBig.png)

    As far as I can tell most of this would already work, but that particular xmltv data isn't stored in the database, and isn't assigned as the #TV.Guide.thumb
    Substituting that value with another such as #TV.Guide.classification (where <rating> has a value with the URL) in the guide data correctly shows the image (if you replace #TV.Guide.thumb in the TV guide skin file).

    Two important changes that may be needed with GUITextureManager.cs
    - It only accepts "http:" prefix as a valid web address (line 161). It should be updated to accept "https:" too.
    - When a URL is used as a <texture> value it downloads the image and temporarily places it in "C:\ProgramData\Team MediaPortal\MediaPortal\thumbs" with a filename like "MPTemp0.jpg". The file is deleted when MediaPortal closes. For these URLs (TV program images) it may reduce remote site load to cache them in "thumbs\tv\Shows", either by time (1 week?) or a size limit.


    Here are two examples of how it could look (with images in an edited skin file and data) in DefaultWideHD's TV Guide:

    [​IMG]


     
    • Like Like x 3
  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
    Further research: This would also need to apply to #TV.Scheduled.thumb, and #TV.RecordedTV.thumb


    I want to help develop a patch for this but I can't run the code. Mediaportal compiles (and runs) but refuses to see the TV server and I'm not sure how to fix that. It might be a longshot but could I provide some untested patches and then a Mediaportal dev could test and fix up any errors?
     
  4. ajs
    • Team MediaPortal

    ajs Development Group

    Joined:
    February 29, 2008
    Messages:
    8,430
    Likes Received:
    2,520
    Gender:
    Male
    Occupation:
    IT
    Location:
    Kyiv
    Ratings:
    +4,441 / 29
    Home Country:
    Ukraine Ukraine
    Show System Specs
    Log with Debug info? From MP and TVServer ...
     
  5. 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
    It turns out it can't see the TV server because I wasn't running it (didn't realise it wasn't part of the sln). Attempting to run the SetupTv project in the TvLibrary sln gives me this in SetupTv.log http://pastebin.com/raw/7mQH6ick
    It says "No connection could be made because the target machine actively refused it 192.168.184.128:31456" but the MySQL service is running (the MP tables and user exist), I've added the loopback and the firewall is disabled. I haven't set up TV server without the MP installer before, could I be missing something?
     
  6. ajs
    • Team MediaPortal

    ajs Development Group

    Joined:
    February 29, 2008
    Messages:
    8,430
    Likes Received:
    2,520
    Gender:
    Male
    Occupation:
    IT
    Location:
    Kyiv
    Ratings:
    +4,441 / 29
    Home Country:
    Ukraine Ukraine
    Show System Specs
    Code (Text):
    1. Service TvService was not found on computer '.'
    Computer '.' ? Address registered in the plugin?
     
  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
    This is C:/ProgramData/Team MediaPortal/MediaPortal TV Server/Gentle.config file http://pastebin.com/6uBR4jHX
    I can't get to the stage of running the TV Server config GUI so that gentle.config is the only place I've done any configuration for the TV Server. The Server name in the DefaultProvider connectionString is the name of the local machine (a Windows 10 (1607) Virtual Machine). The IP on Ethernet0 is 192.168.184.128 and the IP I gave the loopback adapter is 192.160.0.100 (both with subnet mask 255.255.255.0)
     
  8. ajs
    • Team MediaPortal

    ajs Development Group

    Joined:
    February 29, 2008
    Messages:
    8,430
    Likes Received:
    2,520
    Gender:
    Male
    Occupation:
    IT
    Location:
    Kyiv
    Ratings:
    +4,441 / 29
    Home Country:
    Ukraine Ukraine
    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
    I had no TV/Radio entry due to no TvPlugin.dll but I've now compiled it and copied it into the /plugins/windows folder, along with a bunch of other tasks. I can now get the server to start and SetupTv to let me configure it and the client's configuration.exe to connect to it (goes green like yours), but when trying to view the TV guide in MP it times out and asks to confirm server name. This is what the client log has http://pastebin.com/raw/z6bjuGZn
     
  10. ajs
    • Team MediaPortal

    ajs Development Group

    Joined:
    February 29, 2008
    Messages:
    8,430
    Likes Received:
    2,520
    Gender:
    Male
    Occupation:
    IT
    Location:
    Kyiv
    Ratings:
    +4,441 / 29
    Home Country:
    Ukraine Ukraine
    Show System Specs
    Code (Text):
    1. The assembly Gentle.Provider.MySQL could not be loaded or is not a valid Gentle provider
     
    • Thank You! Thank You! x 1
  11. 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
    It turns out Gentle.Provider.MySQL.dll was missing from the client (even though it had one for SQLServer) so I copied it over from the server and now it works.
    Thank you for all your help @ajs , getting a default MP running without an installer was a lot harder than I thought it would be. Hopefully now I can get some code going without too much trouble.
     
    • Thank You! Thank You! x 1
Loading...

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!