Feature #4266

XMLTV Export: add missing fields (episode genres/categories, ratings, etc)

Added by Iván M. A. 10 months ago. Updated 7 months ago.

Status:NewStart date:2017-03-04
Priority:NormalDue date:
Assignee:Adam Sutton% Done:


Target version:4.4



XMLTV export feature only supports title, sub-title and description fields. No genres/categories, ratings, episode images... are exported.

I really need the genres (category fields) to be exported, it's the only way to distinguish between movies and tv shows, news and sport events, etc.

I'm using Over-The-Air EIT DVB Grabber. I don't now yet how the grabber or TVHeadEnd map genres but, if possible, it would be great to export the same genre data grabbed from EIT (my tv shows genres are mapped as Other/Unknown and I would like to fix it)

Thank you.


#1 Updated by Iván M. A. 10 months ago

I've been studying the source code and I've added genres/categories to the XMLTV exporter.

This are the changes needed in src/webui/xmltv.c:


#include "epg.h"


epg_genre_t *genre;
char buf[64];


LIST_FOREACH(genre, &e->genre, link) {
if (genre && genre->code) {
epg_genre_get_str(genre, 0, 1, buf, sizeof(buf), "en");
htsbuf_qprintf(hq, " <category lang=\"en\">");
htsbuf_append_and_escape_xml(hq, buf);
htsbuf_append_str(hq, "</category>\n");

There is a bug in the EIT DVB Grabber (or epg.c mapping functions) related to TV show genres. It does not read or map correctly some of them, so there is no category fields in the xmltv exported file for those genre codes.

Also, the EPG parser ignores completely the credits data (director, actor and writer tags). Kodi supports it...

Will it be fixed/implemented?

Anyway, I've switched from ServerWMC to Tvheadend and I'm freaking out: lightweight, easy configuration, nearly perfect timeshift, fast channel switching...

#2 Updated by saen acro 10 months ago

Add request in GitHub
with this hack EPG is colourful ;)

#3 Updated by Jaroslav Kysela 7 months ago

  • Target version set to 4.4

Also available in: Atom PDF