Posts: 664
Joined: Nov 2008
Reputation:
5
Hi Guys,
I recently sorted out my EPG data and now want to use genre colouring - I use digiguide for my guide data so there is always a sensible set of genres (sitcom, comedy, film etc...) this is sent to XMLTV and imported to MePo.
Could someone explain how I map the genres to something usable by XBMC (I enabled reading of genres in the addon, and have a splash of colour here and there.. but most is still grey)
I looked at the genre_translation.xml file.. but don't understand how / what it's doing.. my strings are in english so i'm not sure if it's even needed, plus there is a default set of genres in Mediaportal TV Server, that I can map the XMLTV genres to, but I'm not sure what genres are even read by XBMC.
Anyone care to shed some light on this?
Posts: 635
Joined: Nov 2012
Reputation:
8
I've been looking for ways to do this myself but so far no luck.
I look forward to learning this procedure also.
Office: Google TV | Kodi 20.0 | Samsung 50" \ Movies: 2734
Master Bedroom: Google TV | Kodi 20.0 | Samsung 43" \ Music: Artist 220 | Albums 1001 | Songs 106995
Theater: Google TV | Kodi 20.0 | Samsung 75" \ TV Shows: 62 | Seasons 218 | Episodes 3858
-----------------------------------------------------------------------------------------------------
Posts: 664
Joined: Nov 2008
Reputation:
5
Well I had a little unexpected time to look at this in the evening, and it's actually pretty straight forward.
You have to make a list of all the genre strings for your EPG data (this will vary depending on where you get it from) - You can also look at the program information within XBMC's guide data / Mediaportal EPG to see which genre is displayed.
Next you have to edit the genre_translations.xml file that is located in the resources folder of the mediaportal addon for XBMC.
You have to make an entry for each of your providers genre strings and map them to XBMC's genres (there is a list of the available genres in the XML file - I assume these are built into XBMC?)
Eg; <genre lang="en" type="0x70" subtype="0x06">film</genre>
So, in the example my provider (digiguide) sets all movies to the 'film' genre, now using the listing in the XML I map this to the main guide type, and then the sub type (excerpt from XML file below);
ARTSCULTURE 0x70 //without music <------- This is the 'main type' value
Subtypes:
PERFORMING_ARTS 0x01
FINE_ARTS 0x02
RELIGION 0x03
POP_CULTURE_TRAD_ARTS 0x04
LITERATURE 0x05
FILM_CINEMA 0x06 <------- Movies should map into this category, so the sub type I use is this one
EXPERIMENTAL_FILM_VIDEO 0x07
BROADCASTING_PRESS 0x08
.......
I seems you can map multiple strings to the same built in string (ie. if your provider uses both 'film' and 'movies' then you just add two lines - one for 'film' and one for 'movies' and set both to 0x70 0x06) then in XBMC both will be displayed as the 'Film/Cinema' genre and have the correct colouring.
Hope this helps!
Posts: 635
Joined: Nov 2012
Reputation:
8
hey thanks a lot Swifty, I'll make this my project for tomorrow.
I appreciate you sharing the info and I'll let you know how it worked out for me.
Office: Google TV | Kodi 20.0 | Samsung 50" \ Movies: 2734
Master Bedroom: Google TV | Kodi 20.0 | Samsung 43" \ Music: Artist 220 | Albums 1001 | Songs 106995
Theater: Google TV | Kodi 20.0 | Samsung 75" \ TV Shows: 62 | Seasons 218 | Episodes 3858
-----------------------------------------------------------------------------------------------------
Posts: 4
Joined: Jan 2013
I tried editing the genre_translation.xml file by adding 1 line
<genre lang="en" type="0x10" subtype="0x09">sitcom</genre>
But it did not show up in the log:
DEBUG: AddOnLog: MediaPortal PVR Client: Opened C:\Program Files (x86)\XBMC\addons\pvr.mediaportal.tvserver\resources\genre_translation.xml to read genre string to type/subtype translation table
DEBUG: AddOnLog: MediaPortal PVR Client: Genre 'movie/drama (general)' => 0x10, 0x0
DEBUG: AddOnLog: MediaPortal PVR Client: Genre 'detective/thriller' => 0x10, 0x1
DEBUG: AddOnLog: MediaPortal PVR Client: Genre 'comedy' => 0x10, 0x4
DEBUG: AddOnLog: MediaPortal PVR Client: Genre 'soap/melodram/folkloric' => 0x10, 0x5
DEBUG: AddOnLog: MediaPortal PVR Client: Genre 'adult movie/drama' => 0x10, 0x8
DEBUG: AddOnLog: MediaPortal PVR Client: Genre 'news/current affairs (general)' => 0x20, 0x0
DEBUG: AddOnLog: MediaPortal PVR Client: Genre 'documentary' => 0x20, 0x3
DEBUG: AddOnLog: MediaPortal PVR Client: Genre 'show/game show (general)' => 0x30, 0x0
DEBUG: AddOnLog: MediaPortal PVR Client: Genre 'sports (general)' => 0x40, 0x0
DEBUG: AddOnLog: MediaPortal PVR Client: Genre 'childrens's/youth program (general)' => 0x50, 0x0
DEBUG: AddOnLog: MediaPortal PVR Client: Genre 'cartoon/puppets' => 0x50, 0x5
DEBUG: AddOnLog: MediaPortal PVR Client: Genre 'music/ballet/dance (general)' => 0x60, 0x0
DEBUG: AddOnLog: MediaPortal PVR Client: Genre 'arts/culture (without music, general)' => 0x70, 0x0
DEBUG: AddOnLog: MediaPortal PVR Client: Genre 'religion' => 0x70, 0x3
DEBUG: AddOnLog: MediaPortal PVR Client: Genre 'magazines/reports/documentary' => 0x80, 0x1
DEBUG: AddOnLog: MediaPortal PVR Client: Genre 'education/science/factual topics (general)' => 0x90, 0x0
DEBUG: AddOnLog: MediaPortal PVR Client: Genre 'nature/animals/environment' => 0x90, 0x1
I continue to get this error:
DEBUG: AddOnLog: MediaPortal PVR Client: EPG: No mapping of 'Sitcom' to genre type/subtype found.
Any advice?
Posts: 664
Joined: Nov 2008
Reputation:
5
0x10, 0x09 doesn't appear to be a valid genre type (well, it's not there in the version I have anyway..)
I *think* that you can only use the hex values that are listed (ie. these the genres supported by XBMC internally) so you basically use the genre_translations.xml file to map your 'sitcom' genre to one of the supported ones.
Try to change the line you added to something like 0x10,0x04 - that should map your 'sitcom' genre to the 'comedy' genre supported inside XBMC.
I would be good if anyone could shed some clarity on this, as I'm mostly guessing at this and the list in the file suggests it's not entirely complete, but it seems to be working for me (well it would be if I could actually write the file somewhere in Openelec!)
Posts: 4
Joined: Jan 2013
Thanks. I tried your suggestion without any success. No matter what I add, the same info shows up in the debug log. I even deleted everything but 2 lines and all the genre info listed above shows up. When I remove the file it does log that the file was not found.
With the original file the only color coding in my EPG is comedy. Maybe it is a RC2 thing.
Posts: 4
Joined: Jan 2013
Finally got it to work. Not sure if what I did was correct, but I now have Genre Colors.
I found genre_translation.xml in 2 locations.
C:\Program Files (x86)\XBMC\addons\pvr.mediaportal.tvserver\resources
C:\Users\Me\AppData\Roaming\XBMC\addons\pvr.mediaportal.tvserver\resources
So I edited them both, refreshed my PVR DB, but the old values continued to show up in the log. I stopped and started my MediaPortal server. Still no luck.
It wasn't until I copied genre_translation.xm from C:\Users\Me\AppData\Roaming\XBMC\addons\pvr.mediaportal.tvserver\resources to C:\Program Files (x86)\XBMC\addons\pvr.mediaportal.tvserver\resources that it worked. (Even though the files were exactly the same). I have since made some edits and had to do the same thing.
On my XBMCBuntu box all I had to do is update /usr/share/xbmc/addons/pvr.mediaportal.tvserver/resources/genre_translation.xml, refresh the PVR DB, and it worked.
Weird.
The MediaPortal TV-Server Configuration tool allows you to edit the Genre info, but that does not seem to flow into XBMC. It would be nice if it did.
In the end I added these values. (I could probably add a ton more according to my DB)
<!-- detective/thriller //-->
<genre lang="en" type="0x10" subtype="0x01">crime</genre>
<genre lang="en" type="0x10" subtype="0x01">crime drama</genre>
<genre lang="en" type="0x10" subtype="0x01">reality</genre>
<!-- adult movie/drama //-->
<genre lang="en" type="0x30" subtype="0x08">action</genre>
<genre lang="en" type="0x30" subtype="0x08">adventure</genre>
<genre lang="en" type="0x30" subtype="0x08">suspense</genre>
<!-- news/current affairs (general) //-->
<genre lang="en" type="0x20" subtype="0x00">news</genre>
<!-- magazines/reports/documentary //-->
<genre lang="en" type="0x80" subtype="0x01">newsmagazine</genre>
<genre lang="en" type="0x80" subtype="0x01">talk</genre>
<genre lang="en" type="0x80" subtype="0x01">entertainment</genre>
<!-- movie/drama (general) //-->
<genre lang="en" type="0x10" subtype="0x00">drama</genre>
<!-- comedy //-->
<genre lang="en" type="0x10" subtype="0x04">comedy-drama</genre>
<genre lang="en" type="0x10" subtype="0x04">romance-comedy </genre>
<genre lang="en" type="0x10" subtype="0x04">sitcom</genre>
<!-- sports (general) //-->
<genre lang="en" type="0x40" subtype="0x00">sports event</genre>
<genre lang="en" type="0x40" subtype="0x00">sports non-event</genre>
<genre lang="en" type="0x40" subtype="0x00">sports talk</genre>
Posts: 83
Joined: Feb 2009
Reputation:
0
Can you show a screenshot of what the epg looks like now? I'd like to maybe use your values..
Thanks.
Posts: 635
Joined: Nov 2012
Reputation:
8
Has anyone come up with a solid formula for getting EPG colors to display properly?
I've tried a few and I'm almost certain it depends on where you're getting your EPG data.
I noticed better results when using data from schedules direct than data from Microsoft EPG data source.
Any thoughts?
Office: Google TV | Kodi 20.0 | Samsung 50" \ Movies: 2734
Master Bedroom: Google TV | Kodi 20.0 | Samsung 43" \ Music: Artist 220 | Albums 1001 | Songs 106995
Theater: Google TV | Kodi 20.0 | Samsung 75" \ TV Shows: 62 | Seasons 218 | Episodes 3858
-----------------------------------------------------------------------------------------------------
Posts: 70
Joined: Aug 2013
Reputation:
1
Maybe I misunderstand you Hoops, but I don't think it matters where you get your EPG data. The completeness of EPG colors just depends on you modifying the genre_translation.xml. If you have added all possible genre descriptions that your data is using... then all of your programming will be colored.
Posts: 70
Joined: Aug 2013
Reputation:
1
Short answer is you cannot add new genres. You can only map (translate) the ones you get from your EPG provider to the ones that are hard-coded into XBMC.
For example, golf isn't working because 0x0H doesn't exist... I think I mapped mine to 0x00 so it just says Sporting Event.
It took me a long time to get my head around how it worked... I had given up on 2 previous occasions.
Tommy
I'll install Drop Box and upload mine. I am using schedules direct so ours should be the same
Posts: 635
Joined: Nov 2012
Reputation:
8
Looking forward to comparing our files
Thanks in advance
Office: Google TV | Kodi 20.0 | Samsung 50" \ Movies: 2734
Master Bedroom: Google TV | Kodi 20.0 | Samsung 43" \ Music: Artist 220 | Albums 1001 | Songs 106995
Theater: Google TV | Kodi 20.0 | Samsung 75" \ TV Shows: 62 | Seasons 218 | Episodes 3858
-----------------------------------------------------------------------------------------------------