Project

General

Profile

Missing episode system="xmltv_ns"

Added by Morten Sørensen over 12 years ago

Hello

First of all; I would like to thank you for making Tvheadend.

I am encountering some problems with getting the episode number into Tvheadend. To my understanding Tvheadend should support xmltv_ns, but it isn't showing up. I posted this problem over at ontv.dk, and a user replied that he did not see the episode information in Tvheadend either. The category isn't showing up, but this is not as important as the episode.

I would really appreciate it, if someone could help me out.

            <programme channel="www.ontv.dk/tv/7" start="20120401022500 +0200" stop="20120401031500 +0200">
                <title lang="dk">CSI: New York</title>
                <desc lang="dk">Mac prøver at opsopre en pige som forsvandt i 2002, efter at have overværet et indbrud som førte til mord.</desc><category lang="EN">serie</category>
                <episode-num system="xmltv_ns"> .161. </episode-num>
                   <icon src='http://ontv.dk//imgs/print_img.php?sti=/imgs/epg/channel/2012-03-31/7/71333239900.jpg&amp;height=&amp;width=' />
            </programme>

Replies (8)

RE: Missing episode system="xmltv_ns" - Added by Hein Rigolo over 12 years ago

have a look at /src/xmltv.c around line 340 and down.

Based on what I read there I would suspect that it should work (an a recent build of tvheadend), but there might be some bugs.
Try to see what happens if you replace the .161. with 0.161.0 .. maybe then it works.

Hein

RE: Missing episode system="xmltv_ns" - Added by Morten Sørensen over 12 years ago

Tried to change it, but unfortunately it didn't work. I'm on git-85e23bb, so i should have support for it.

RE: Missing episode system="xmltv_ns" - Added by Morten Sørensen over 12 years ago

I just did some more investigation, when i change to system="onscreen" the episode shows up. But of course it is in the xmltv_ns format, so not really an solution. I'm not sure where to go from here.

RE: Missing episode system="xmltv_ns" - Added by Otto Meurer over 12 years ago

Anyone know why the above is not working, i also have the same issue.
Episode numbers not sohwing up in WEB GUI neither while watching TV.

/Oz

RE: Missing episode system="xmltv_ns" - Added by Morten Sørensen over 12 years ago

It is weird that this has not been reported before, as xmltv_ns to my understanding is more common than onscreen. This led me to believe that something may be wrong with the xml provided. If anyone has this working, could you please provide your xml output , so I can test if this in fact is the problem.

RE: Missing episode system="xmltv_ns" - Added by Phill Lavender over 12 years ago

Had the same problem.

Looked in xmltv.c

'Episode' in the UI is taken from ee->ee_onscreen which is a 'Char*'
There are separate fields which carry the parse xmltv_ns vaules ee->ee_episode and ee->ee_season, both are defined as 'int', but aren't ever converted back to characters, to display in the UI 'Episode' tag.

Patch xmltv.c with the following and you'll get the Episode number as text if you use the xmltv_ns system.

/** *
*/
static void
get_episode_info(htsmsg_t *tags, epg_episode_t *ee) {
htsmsg_field_t *f;
htsmsg_t *c, *a;
const char *sys, *cdata;
// Patch: Added char array buffer 20, should be more then enough, maybe better way.
char buffer [20];
// End Patch

memset(ee, 0, sizeof(epg_episode_t));
HTSMSG_FOREACH(f, tags) {
if((c = htsmsg_get_map_by_field(f)) NULL ||
strcmp(f->hmf_name, "episode-num") ||
(a = htsmsg_get_map(c, "attrib")) NULL ||
(cdata = htsmsg_get_str(c, "cdata")) NULL ||
(sys = htsmsg_get_str(a, "system")) NULL)
continue;
if(!strcmp(sys, "onscreen"))
tvh_str_set(&ee->ee_onscreen, cdata);
else if(!strcmp(sys, "xmltv_ns"))
parse_xmltv_ns_episode(cdata, ee);
// Patch: Add episode from xmltv_ns back to onscreen variable
sprintf(buffer, "%i", ee->ee_episode);
tvh_str_set(&ee->ee_onscreen, buffer);
// End Patch
}
}

Sorry for the cut an paste but I haven't quite got round to creating a proper patch file !
Also I think it would be better to take the Season and Episode from xmltv_ns and form something like: 'sxxeyy' as the onscreen text.

Phill

RE: Missing episode system="xmltv_ns" - Added by Otto Meurer over 12 years ago

Hi Phill

Nice i would love to try it, but were do i find xmltv.c other than i repository?

Is it possible to find the file and edit it in an existing installation like OPENELEC with Tvheadend enabled?

If not i would love the people behind Tvheadend to correct this into the next release.

/oz

RE: Missing episode system="xmltv_ns" - Added by Phill Lavender over 12 years ago

Hi,
Xmltv.c needs to be compiled with the other C files of tvheadend for the target architecture, so you can't just go and change it.
I'm not sure what's required to compile tvheadend for openelec (I think it's just a very light weight debian variant) but should be to hard.
Once I know what people want to see in the episode column (Sxx.Eyy) I can create a patch and have it added to the repo for inclusion in a future release.
Phil.

    (1-8/8)