Help needed matching xml <category> strings for importing EPG data
#1
Recently I've been working getting epg xml data into kodi, which works like a charm,
but for the categories with colour coding.

The problem is finding out how they get matched, from what I researched they should match the strings used for tvheadend, being listed here;
https://github.com/tvheadend/tvheadend/b.../src/epg.c
lines 1951 to 2097

However, most programs get unknown tags and no colour, obviously they don't get matched but for a selected few.
I did find the strings here; https://raw.githubusercontent.com/xbmc/x...strings.po
String id's 19499 to 19684 are being used.
Comparing these string id's I also found some strings not being used by tvheadend but available to me by my source, mainly subcategories.

From what I take ./xbmc/epg/Epg.cpp matches these strings and it's not really clear to me from the script how it does it.
So anyone can you point me in the right direction? with all the above info it should be fairly simple yet I must miss a small piece of the puzzle.


This is a working example for me -> <category>Documentary</category> -> <string id="19519">
Reply
#2
https://tvheadend.org/boards/12/topics/9892

Here's a nice example of something similar for a French source, also to be used with Kodi (back then xbmc).
I'm using the exact same strings as they do as by the standard, but no luck.

Really gave up on me finding this in the code, I hope some PVR dev sees this or someone and can point me out what's going on here.


These are the matches being made in case someone wonders;

Code:
class XMLTVDocument(object):
  # this renames some of the channels
  add_display_name = {}
  category_map = {'tv drama': 'Movie / Drama',
    'actie': 'Movie / Drama',
    'familie': 'Movie / Drama',
    'thriller': 'Detective / Thriller',
    'detective': 'Detective / Thriller',
    'avontuur': 'Adventure / Western / War',
    'western': 'Adventure / Western / War',
    'horror': 'Science fiction / Fantasy / Horror',
    'sci-fi': 'Science fiction / Fantasy / Horror',
    'komedie': 'Comedy',
    'melodrama': 'Soap / Melodrama / Folkloric',
    'romantiek': 'Romance',
    'drama': 'Serious / Classical / Religious / Historical movie / Drama',
    'erotiek': 'Adult movie / Drama',
    'nieuws': 'News / Current affairs',
    'weer': 'News / Weather report',
    'nieuws documentaire': 'News magazine',
    'documentaire': 'Documentary',
    'historisch': 'Documentary',
    'waar gebeurd': 'Documentary',
    'discussie': 'Discussion / Interview / Debate',
    'show': 'Show / Game show',
    'variété': 'Variety show',
    'talkshow': 'Talk show',
    'sport': 'Sports',
    'gevechtssport': 'Sports',
    'wintersport': 'Sports',
    'paardensport': 'Sports',
    'evenementen': 'Special events (Olympic Games; World Cup; etc.)',
    'sportmagazine': 'Sports magazines',
    'voetbal': 'Football / Soccer',
    'tennis/squash': 'Tennis / Squash',
    'teamsporten': 'Team sports (excluding football)',
    'atletiek': 'Athletics',
    'motorsport': 'Motor sport',
    'extreme': 'Motor sport',
    'watersport': 'Water sport',
    'kids/jeugd': 'Children's / Youth programmes',
    'kids 0 - 6': 'Pre-school children's programmes',
    'jeugd 6 - 14': 'Entertainment programmes for 6 to 14',
    'jeugd 10 - 16': 'Entertainment programmes for 10 to 16',
    'poppenspel': 'Cartoons / Puppets',
    'educatie': 'Informational / Educational / School programmes',
    'muziek': 'Music / Ballet / Dance',
    'ballet': 'Music / Ballet / Dance',
    'easy listening': 'Music / Ballet / Dance',
    'musical': 'Music / Ballet / Dance',
    'rock/pop': 'Rock / Pop',
    'klassiek': 'Serious music / Classical music',
    'volksmuziek': 'Folk / Traditional music',
    'jazz': 'Jazz',
    'musical': 'Musical / Opera',
    'lifestyle': 'Arts / Culture (without music)',
    'beeldende kunst': 'Performing arts',
    'mode': 'Fine arts',
    'kunst magazine': 'Fine arts',
    'religie': 'Religion',
    'popart': 'Popular culture / Traditional arts',
    'literatuur': 'Literature',
    'speelfilm': 'Film / Cinema',
    'shorts': 'Experimental film / Video',
    'special': 'Broadcasting / Press',
    'maatschappelijk': 'Social / Political issues / Economics',
    'actualiteiten': 'Magazines / Reports / Documentary',
    'economie': 'Economics / Social advisory',
    'beroemdheden': 'Remarkable people',
    'educatie': 'Education / Science / Factual topics',
    'natuur': 'Nature / Animals / Environment',
    'technologie': 'Technology / Natural sciences',
    'geneeskunde': 'Medicine / Physiology / Psychology',
    'expedities': 'Foreign countries / Expeditions',
    'sociologie': 'Social / Spiritual sciences',
    'educatie divers': 'Further education',
    'talen': 'Languages',
    'vrije tijd': 'Leisure hobbies',
    'reizen': 'Tourism / Travel',
    'klussen': 'Handicraft',
    'auto en motor': 'Motoring',
    'gezondheid': 'Fitness and health',
    'koken': 'Cooking',
    'shoppen': 'Advertisement / Shopping',
    'tuinieren': 'Gardening'}
Reply
#3
Not sure I understand exactly what you are asking, but this is the table I used for getting the genre color coding right in the wmc addon.

https://github.com/margro/xbmc-pvr-addon...lation.xml
Windows Media Center PVR addon (pvr.wmc) and server backend (ServerWMC)
http://bit.ly/serverwmc
Reply
#4
This is exactly what I'm asking, though it's for the MediaPortal add-on and I'm using the DVBviewer add-on now I'll try it out.
There are even some differences with the ones that are working now.
But nowhere I was able to find a proper list, I wonder why it's there and not at the general places I looked for, doesn't make a lot of sense.
Also if this works I think it really should be in the wiki, so far looked 5 days straight for it.
Reply
#5
Glad it was useful. I agree about this info being hard to find, I was lucky and found it early in my project. But re-finding it was more difficult, so I finally got smart and pasted a link to it directly in my code.
Windows Media Center PVR addon (pvr.wmc) and server backend (ServerWMC)
http://bit.ly/serverwmc
Reply

Logout Mark Read Team Forum Stats Members Help
Help needed matching xml <category> strings for importing EPG data1