v17 How does Estuary assign genre colours using the 'epg-genres' files?
#1
I have spent a good while puzzling out the 'How to get EPG genre colours working' problem on V17 Krypton since moving from V16 Jarvis and I am almost there but not quite...

My EPG setup is as follows -           EPG Collector  -->  (xmltv file)  -->  NextPVR  -->  Kodi

EPG Collector allows genre names to be modified via a configuration file, so I have (I think) the correctly formed genre names going into NPVR and then to Kodi.
For example:  Sports,  News/Current affairs,  Documentary,  Movie/Drama,  Science Fiction/Fantasy/Horror,   etc.

The Kodi EPG does then show some entries in colour, but the process of assigning a colour to a genre is a mystery to me and I can't see how it works.
After much googling I have found the 'epg-genres' directory which contains a set of numbered .png files and I assume that the numbers correspond to categories/genres but I can't find any documentation which describes what is going on.
For example, is it possible to control how a particular colour is assigned to any given genre?

Any guidance gratefully received!
Thanks.
Reply
#2
Not sure about the NextPVR plugin but it also took me a long time to figure this out with the IPTV Simple Client.

Basically I had to create a genres.xml file with some values that map to those PNG files for color coding.  Maybe its the same for  the NextPVR client.  Hopefully this at least helps out.


More details in this thread.

https://forum.kodi.tv/showthread.php?tid...pid2637266
Reply
#3
https://forum.kodi.tv/showthread.php?tid=201883


you need to edit them in media Textures.xbt
Reply
#4
Thanks for these suggestions.
I think my problem lies within Kodi because I can see the genre names passed from NextPVR in the Kodi EPG, but I can't see how those genre names get mapped to a particular colour?

I have trawled through the code for the skin and I came across the following line in file 'Includes_PVR.xml' -
<texture border="3" fallback="windows/pvr/epg-genres/0.png">$INFO[ListItem.Property(GenreType),windows/pvr/epg-genres/,.png]</texture>

So it looks like there is a value called 'GenreType' which is used to select the colour.

Where does 'GenreType' come from?  Somewhere there must be some code which translates the genre name from the EPG data into this numerical 'GenreType'.
I can't find anywhere that this is documented, although there are a number of old posts asking similar questions.
Reply
#5
Once you have unpacked the texture.xbt file using the Kodi Texture tool, navigate to the Windows\pvr\epg-genres folder.
Here you will the skin's numerical genre colour texture files. However, not all colours seem to be covered and 256 for instance seems to cover multiple genres.
I got around the problem by changing the code on the includes_pvr.xml from:
<texture border="3" fallback="windows/pvr/epg-genres/0.png">$INFO[ListItem.Property(GenreType),windows/pvr/epg-genres/,.png]</texture> and changing it slightly to:-
<texture border="3" fallback="windows/pvr/epg-genres/0.png">$INFO[ListItem.Genre,windows/pvr/epg-genres/,.png]</texture>

This will allow you to create Genres colour files based on the actual Genre name and not Kodi's numerical genre type. For example you could create new text genres like:-
Movie
Drama
Documentary

Obviously you would need to change the colour for each genre or use the same colour for groups (Movie and Film for example). If you google Kodi PVR genres, you will be able to source previous posts from users who have already created genres this way and have links to their genre files, although you may need to change some of them to suit your own epg genre data, but might save you a lot of extra work creating your own genre colour files.
Hope this helps
Reply
#6
Dumyat - Thank you - This works first time, and bypasses the need to puzzle out whatever goes on with GenreType within Kodi.
I previously had genre colouring in V16 Jarvis using a similar method which I originally saw here - https://forum.kodi.tv/showthread.php?tid=175642 
and with a few changes it still works in V17.

Just for completeness I have written out the steps I took - though I'm just duplicating yours...

In your skin folder, find MyPVRGuide.xml
(Note that you should copy the original skin and switch to your copy, otherwise your modifications may be overwritten when Kodi updates).

Edit MyPVRGuide.xml to find the two lines containing -
<texture border="3" fallback="windows/pvr/epg-genres/0.png">$INFO[ListItem.Property(GenreType),windows/pvr/epg-genres/,.png]</texture>
and replace them with -
<texture border="3" fallback="windows/pvr/epg-genres/0.png">$INFO[ListItem.Genre,windows/pvr/epg-genres/,.png]</texture>

This will get Kodi to select a texture file with the same name as the genre, rather than with a numerical name given by GenreType.

The epg-genres folder must now be populated with texture files (each containing your chosen colour) and named according to the genre shown in your EPG.
(You can simply rename the texture files already there if you wish).
You can now have any number of genres and colours by adding files to the epg-genres folder.
Note that your EPG genre names must now also be legal file names, so if your EPG shows a genre such as 'Movies/Drama' you must make sure you change it to 'Movies-Drama' or similar.
Reply
#7
Glad it worked for you Smile
Forgot to mention the multiple genre scenario, but looks like you've sorted that out as well.....
Reply
#8
Just for completeness... if you wanted to change the entire EPG background to a single colour such as yellow in my case you would do:

Includes_PVR.xml
Code:
<texture border="3" fallback="windows/pvr/epg-genres/0.png">$INFO[ListItem.Property(GenreType),windows/pvr/epg-genres/,.png]</texture>
 
Code:
<texture border="3" fallback="windows/pvr/epg-genres/0.png">windows/pvr/epg-genres/48.png</texture>
Reply
#9
Smile  Thanks for this!
Reply

Logout Mark Read Team Forum Stats Members Help
How does Estuary assign genre colours using the 'epg-genres' files?0