v18 PVR EPG Grid: Display TV Show art/poster instead of Channel Icon
#1
So as one of the conditions for allowing our family to truly cut the cord, the wife wants the PVR section in Kodi to look and feel similar to how a set top box would operate, especially the EPG Grid section. I was inspired by the work @Dumyat did with his own PVR Mod for Estuary, so I've been tinkering with the default Estuary skin and have come a long way. The place that I am stuck right now is the ability to display the TV show art rather than the default channel icon.

I realize that the Skin Helper Service is what I need to use and I of course have installed it. But my question is, how do I go about calling it into action and also making the necessary changes to the skin xml to use it? I've searched all through here and all I can find is mentions of specific MODS that use it, but not how its done -- specifically for v18.

Like I said, I want to show TV show art/poster in place of the channel icon that Estuary displays by default. So, from the MyPVRGuide.xml file, I know the following needs to change:
Code:
<control type="image">
     <top>100</top>
     <left>30</left>
     <width>290</width>
     <height>250</height>
     <aspectratio align="center" aligny="center">keep</aspectratio>
            <fadetime>400</fadetime>
            <texture>$INFO[ListItem.Icon]</texture>
</control>

Can someone, anyone, point me in the right direction? I'm ready to put some of my work out there for all to see, I just want to have this current need sorted before I do.

Many thanks in advance!
Reply
#2
What’s your PVR backend? Kodi / Estuary support this natively - I have artwork in my EPG from my NextPVR backend.
Reply
#3
(2020-03-10, 21:19)tredman Wrote: What’s your PVR backend? Kodi / Estuary support this natively - I have artwork in my EPG from my NextPVR backend.
I'm using TVHeadend v4.2.8-36. I believe that artwork from a TVH backend is supported as well. However, doesn't it need to come from your actual epg data (xmltv, json, etc)?
Reply
#4
(2020-03-10, 21:32)yuengling25 Wrote:
(2020-03-10, 21:19)tredman Wrote: What’s your PVR backend? Kodi / Estuary support this natively - I have artwork in my EPG from my NextPVR backend.
I'm using TVHeadend v4.2.8-36. I believe that artwork from a TVH backend is supported as well. However, doesn't it need to come from your actual epg data (xmltv, json, etc)?


Ah, urgh. I gave up using tvheadend (after 8 years). as it was a pain to get artwork sorted. There’s even a thread in tvheadend section from me about this.

Yes tvheadend does support artwork, but I think the only realistic way is to use 4.3 which I believe supports grabbing it from tvdb. However, having used unsupported tvheadend versions in the past that wasn’t an option for me.

NextPVR with schedulesdirect works out of the box.

Edit - FWIW I configured tvheadend with exactly the same xml import from schedulesdirect as NextPVR. No artwork.
Reply
#5
(2020-03-10, 23:04)tredman Wrote: Ah, urgh. I gave up using tvheadend (after 8 years). as it was a pain to get artwork sorted. There’s even a thread in tvheadend section from me about this.

Yes tvheadend does support artwork, but I think the only realistic way is to use 4.3 which I believe supports grabbing it from tvdb. However, having used unsupported tvheadend versions in the past that wasn’t an option for me.

NextPVR with schedulesdirect works out of the box.

Edit - FWIW I configured tvheadend with exactly the same xml import from schedulesdirect as NextPVR. No artwork.
Yeah, I think NextPVR does what only the unsupported TVH builds (v4.3+) will do. I actually flirted with NextPVR recently but, as my backend is located on a Linux box, the setup was quite tedious compared to the TVH web interface. So I dropped it.

In the meantime, I was able to figure out how to set things up to do what I wanted via the Skin Helper Service. For all the digging I did, it ended up being surprisingly simple. Almost TOO simple. The only problem I see is that it doesn’t populate the TV show poster art very quickly. I suspect this is normal behavior though, as scraping image after image can take time until the cache is built up. That, or maybe how I implemented it really was too simple to be 100% correct?
Reply
#6
@tredman -- do you possibly know what InfoLabel is referenced in order for the skin to grab and display the artwork that is coming from the NextPVR epg data? I enabled the NextPVR add-on in Kodi and set the advanced setting to download the tv show art, but can't get my skin to grab the artwork properly. When I set it as "ListItem.EPGEventIcon" it works, but displays the artwork in landscape. I need it to be in portrait.

I've tried ListItem.Art(poster), Player.Art(tvshow.poster), Container.ListItem.Art(poster), etc but nothing seems to work. Any insight would be appreciate. If I can get this to work, I may suck it up with the initial setup of NextPVR and stick with it.
Reply
#7
https://forum.kodi.tv/showthread.php?tid=342781
some are landscape some are  portrait.

you may need to use
    <aspectratio aligny="center">keep</aspectratio>


xml:
 <control type="image">
        <top>15</top>
        <left>55%</left>
        <width>300</width>
        <height>260</height>
        <aspectratio align="center" aligny="center">keep</aspectratio>
        <fadetime>400</fadetime>
      <texture>$INFO[ListItem.ActualIcon]</texture>
      </control>

Image
Reply
#8
(2020-03-12, 01:33)the_other_guy Wrote: https://forum.kodi.tv/showthread.php?tid=342781
some are landscape some are  portrait.

you may need to use
    <aspectratio aligny="center">keep</aspectratio>


xml:
 <control type="image">
        <top>15</top>
        <left>55%</left>
        <width>300</width>
        <height>260</height>
        <aspectratio align="center" aligny="center">keep</aspectratio>
        <fadetime>400</fadetime>
      <texture>$INFO[ListItem.ActualIcon]</texture>
      </control>
So this is what I don't understand. The whole landscape vs portrait issue -- especially the seemingly haphazard way it happens.

For example, here is the artwork for an epg entry as displayed by the NextPVR web interface, and then how it is being diisplayed in Kodi based on referencing ListItem.ActualIcon:

Image   Image

Is this due a difference between how the NextPVR web interace handles displaying the image and how Kodi does it via the ActualIcon property? Because the url data for the image is literally the same for both upon my inspection. Is there a way to force the portrait mode in Kodi?
Reply
#9
(2020-03-12, 14:48)yuengling25 Wrote:
(2020-03-12, 01:33)the_other_guy Wrote:  
Is there a way to force the portrait mode in Kodi?     
Unfortunately not. PVR Artwork is not handled in the same way as the Movies and TV Show libraries. 
The only option to specify poster/portrait is via the Skin Helper Script. But as you have discovered already, it can be quite slow at times getting images from the SHS. 
It doesn't help that the SHS isn't really maintained anymore and could break at any time. 
What I've done myself is to opt for my artwork images from Skin Helper Script to be downloaded to a folder on a hard drive for PVR purposes via the settings on the script. These local images load immediately and I can specify what artwork type I want see on my PVR  screens (Poster, Fanart, Landscape) Clearlogo, Banner, Clearart are also downloaded from the SHS, which can be used as well.
Reply
#10
(2020-03-13, 14:13)Dumyat Wrote:
(2020-03-12, 14:48)yuengling25 Wrote:
(2020-03-12, 01:33)the_other_guy Wrote:  
Is there a way to force the portrait mode in Kodi?      
Unfortunately not. PVR Artwork is not handled in the same way as the Movies and TV Show libraries. 
The only option to specify poster/portrait is via the Skin Helper Script. But as you have discovered already, it can be quite slow at times getting images from the SHS. 
It doesn't help that the SHS isn't really maintained anymore and could break at any time. 
What I've done myself is to opt for my artwork images from Skin Helper Script to be downloaded to a folder on a hard drive for PVR purposes via the settings on the script. These local images load immediately and I can specify what artwork type I want see on my PVR  screens (Poster, Fanart, Landscape) Clearlogo, Banner, Clearart are also downloaded from the SHS, which can be used as well. 
The SHS is quite slow at times and it also seems like the title matching isn't the most precise. I am mostly interested in Poster type, and it almost seems like the successful scrapes are minimal. Unless I am doing something wrong of course (which I wouldn't be surprised at all if that was the case).

Is there a way to perhaps fine-tune the SHS?
Reply
#11
The SHS script by default searches for movie titles first on the TMDB site, before TV shows on the TVDB site. This will account for some mis-matches, which I frequently get myself.
Mis-matches can be easily fixed by the using the 'Artwork Options' via the context menu and selecting 'Refresh' ( Manual look-up). Once you've found the show you want and select it, this will overwrite previous mis-match.

For ListItem Artwork, ie Artwork on the EPG screen where no channel is actually playing, I use the following code:-

xml:
<control type="image">
    <left>-5</left>
    <top>260</top>
    <width>245</width>
    <height>345</height>
    <texture fallback="DefaultPVRPoster.png">$INFO[Window(Home).Property(SkinHelper.ListItem.Art.Poster)]</texture>
   </control>
Obviously you can use your own co-ordinates, height and width. Fallback texture is what appears if no artwork can be found.
Applying your own personal API keys for the TMDB and TVDB sites in the SHS settings may yield a faster response for fetching artwork images.

But if you are looking for instant fetching of artwork, that is always 100% correct with no mis-matches, then probably the SHS is not the right solution for your needs. Bottom line is using the SHS for PVR artwork does have it's limitations.
Reply
#12
(2020-03-13, 23:27)Dumyat Wrote: The SHS script by default searches for movie titles first on the TMDB site, before TV shows on the TVDB site. This will account for some mis-matches, which I frequently get myself.
Mis-matches can be easily fixed by the using the 'Artwork Options' via the context menu and selecting 'Refresh' ( Manual look-up). Once you've found the show you want and select it, this will overwrite previous mis-match.

For ListItem Artwork, ie Artwork on the EPG screen where no channel is actually playing, I use the following code:-

xml:
<control type="image">
    <left>-5</left>
    <top>260</top>
    <width>245</width>
    <height>345</height>
    <texture fallback="DefaultPVRPoster.png">$INFO[Window(Home).Property(SkinHelper.ListItem.Art.Poster)]</texture>
   </control>
Obviously you can use your own co-ordinates, height and width. Fallback texture is what appears if no artwork can be found.
Applying your own personal API keys for the TMDB and TVDB sites in the SHS settings may yield a faster response for fetching artwork images.

But if you are looking for instant fetching of artwork, that is always 100% correct with no mis-matches, then probably the SHS is not the right solution for your needs. Bottom line is using the SHS for PVR artwork does have it's limitations.
Thanks @Dumyat! So this is clearly my ignorance speaking but, how do I get to the Artwork Options context menu to set things to do the Refresh/Manual Lookup you described? Also, where are the SHS setting to input the API keys? Is it under the Add-on settings?
Reply
#13
So in playing with SHS, I am getting this error quite a bit when I go a Refresh/Manual Lookup under the Artwork Options in the context menu:
 
Code:
2020-03-17 10:13:47.982 T:140012556089088 WARNING: CPythonInvoker(17, /home/satterw/.kodi/addons/script.skin.helper.service/resources/lib/context_pvr.py): the python script "/home/satterw/.kodi/addons/script.skin.helper.service/resources/lib/context_pvr.py" has left several classes in memory that we couldn't clean up. The classes include: N9XBMCAddon9xbmcaddon5AddonE,N9XBMCAddon9xbmcaddon5AddonE,N9XBMCAddon7xbmcgui6WindowE,N9XBMCAddon7xbmcgui6WindowE,N9XBMCAddon4xbmc7MonitorE,N9XBMCAddon7xbmcgui6WindowE,N9XBMCAddon4xbmc7MonitorE
2020-03-17 10:15:47.840 T:140012530910976 WARNING: addons must not activate DialogBusy
2020-03-17 10:15:55.152 T:140013445065088   ERROR: Control 3 in window 13000 has been asked to focus, but it can't
2020-03-17 10:15:58.035 T:140012530910976   ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
                                             - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
                                            Error Type: <type 'exceptions.AttributeError'>
                                            Error Contents: 'NoneType' object has no attribute 'lower'
                                            Traceback (most recent call last):
                                              File "/home/satterw/.kodi/addons/script.skin.helper.service/resources/lib/context_pvr.py", line 27, in <module>
                                                metadatautils.pvr_artwork_options(title, channel, genre)
                                              File "/home/satterw/.kodi/addons/script.module.metadatautils/lib/metadatautils.py", line 145, in pvr_artwork_options
                                                return self.pvrart.pvr_artwork_options(title, channel, genre)
                                              File "/home/satterw/.kodi/addons/script.module.metadatautils/lib/helpers/pvrartwork.py", line 241, in pvr_artwork_options
                                                self.get_pvr_artwork(title=title, channel=channel, genre=genre, ignore_cache=True, manual_select=True)
                                              File "/home/satterw/.kodi/addons/script.module.metadatautils/lib/helpers/pvrartwork.py", line 128, in get_pvr_artwork
                                                tvdb_match = self.lookup_tvdb(searchtitle, channel, manual_select=manual_select)
                                              File "/home/satterw/.kodi/addons/script.module.metadatautils/lib/helpers/pvrartwork.py", line 377, in lookup_tvdb
                                                network = item["network"].lower().replace(" ", "")
                                            AttributeError: 'NoneType' object has no attribute 'lower'
                                            -->End of Python script error report<--
Any help on what could be causing this? 

Another thing I also noticed is that I am not showing an option to enter an API code for The TVDB anywhere. I can do the same for TMBD, however. But, I get the erroring pointed out above quite often.
Reply
#14
(2020-03-17, 16:27)yuengling25 Wrote: So in playing with SHS, I am getting this error quite a bit when I go a Refresh/Manual Lookup under the Artwork Options in the context menu:
 

Look here: https://forum.kodi.tv/showthread.php?tid...pid2933557

In "script.module.metadatautils" replace the file "pvartwork.py" with this code.
Then the PVR artwork should work well, also the manual search.
Reply
#15
The PVR EPG API is undefined on whether to send portrait or landscape for the event_id and only one option is available.  I did check the NextPVR logs and for Kodi landscape is being sent and the browser sends portrait for the same url as you said.

I am not sure why there are different response, but I suspect @sub3  forces landscape for Kodi perhaps it looked better in the Confluence skin which was default when the addon was created?  

Martin
Reply

Logout Mark Read Team Forum Stats Members Help
PVR EPG Grid: Display TV Show art/poster instead of Channel Icon1