Feature #4266
XMLTV Export: add missing fields (episode genres/categories, ratings, etc)
0%
Description
Hello,
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.
History
Updated by Iván M. A. almost 8 years 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:
23a24
#include "epg.h"
91a93,94
epg_genre_t *genre;
char buf[64];
114a118,125
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...
Updated by Gene Stapp almost 7 years ago
Iván M. A. wrote:
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:
23a24
#include "epg.h"
91a93,94
epg_genre_t *genre;
char buf[64];114a118,125
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");
}
}
I'm wanting to apply this change to xmltv.c in the source code as a test to see if it fixes an issue i'm having with the xml export and plexdvr epg import (everything is listing as a movie). Could someone explain where i need to add these snippets of code in the current source xmltv.c file? I tried it on my own and compile isn't working
Updated by Maurice de Laat almost 4 years ago
Hello,
Sorry to bring this up, but it seems like exactly the addition I need.
As I understand correctly (please correct me if I am wrong):
- this change will be in 4.4 release
- 4.4 has not been released yet
I have 4.2.8 running on a raspberry. Other then this detail it works perfectly.
Is there a way I can get this change into my raspberry while waiting for the 4.4 release?
Thank you!
Updated by Flole Systems almost 4 years ago
This change will only be in 4.4 if someone implements it. Otherwise it won't be in 4.4 or any other future version.
I'm not sure but based on the revisions at least part of the work seems to be done already.
Updated by Skyler Mäntysaari almost 4 years ago
Where is the current source tree with these changes?
My serieses for example have no categories, and I have no idea why so I cannot use it with Plex as it needs the categories.