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

Blue Lightning

Portal Member
October 8, 2011
49
52
Home Country
Antarctica Antarctica
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:

hgHrOPU.png
 

Blue Lightning

Portal Member
October 8, 2011
49
52
Home Country
Antarctica Antarctica
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?
 

Blue Lightning

Portal Member
October 8, 2011
49
52
Home Country
Antarctica Antarctica
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?
 

Blue Lightning

Portal Member
October 8, 2011
49
52
Home Country
Antarctica Antarctica
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)
 

Blue Lightning

Portal Member
October 8, 2011
49
52
Home Country
Antarctica Antarctica
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
 

Blue Lightning

Portal Member
October 8, 2011
49
52
Home Country
Antarctica Antarctica
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.
 

Users who are viewing this thread

Top Bottom