Project

General

Profile

xmltv from tvheadend with category and episode infos

Added by M A Ben Amara about 6 years ago

Hi,

when i fetch the epg from tvh /ip:9981/xmltv) it doesnt report the category and the episode infos from tvshows,
i think i saw some hack about the category, not about the episode info, any chance to get that implemented ?

for an tip thanks ahead


Replies (10)

RE: xmltv from tvheadend with category and episode infos - Added by Em Smith about 6 years ago

Took a while to find it, but I think this is what you wanted for category:
[[https://tvheadend.org/issues/4266]]
I'll take a look at episode info this weekend if I have time.

RE: xmltv from tvheadend with category and episode infos - Added by M A Ben Amara about 6 years ago

thanks alot ahead for taking a look ;)

RE: xmltv from tvheadend with category and episode infos - Added by Em Smith about 6 years ago

Not a problem. I've submitted a patch which will add episode info and genre information if they are available. It should be available in a few days in the 4.3 releases.

RE: xmltv from tvheadend with category and episode infos - Added by M A Ben Amara about 6 years ago

g morning, thanks for adding the feature, may a question about the format ? ;)

from TVHeadend i get this format

<episode-num system="xmltv-ns">0/ . 9/10 . / </episode-num></programme>

i assume the correct format supposed to be

<episode-num system="xmltv-ns">0.9/10.</episode-num></programme>

or another sample (without info episode total)

<episode-num system="xmltv-ns">4/ . 3/ . / </episode-num></programme>
<episode-num system="xmltv_ns">4.3.</episode-num>

any chance to get this output ?

thanks ahead for the effort

RE: xmltv from tvheadend with category and episode infos - Added by Em Smith about 6 years ago

The xmltv specification is an odd one, but I think the lines are correct.

[[http://xml.coverpages.org/XMLTV-DTD-20021210.html]]

Effectively, the "." is a separator between season, episode and part number; and the "/" is a separator between the number (with one subtracted) and the total number; all spaces are optional.

So your first example is season 1 of an unknown number of seasons, episode 10/10.

The second one is season 5 episode 4.

RE: xmltv from tvheadend with category and episode infos - Added by M A Ben Amara about 6 years ago

i see, my samples are always the same episodes

TVHeadend >0/ . 9/10 . / <
xmltv >0.9/10.< and other xml EPG parsers respond like this ...

in TVH result theres an extra / after the season, the 9/10 is correct, then theres another / extra in the end ...

so the 0.9/10 should be the correct result, season 1, episode 10 from 10, same as TVHeadend xmltv respond, but there are 2 "/" more then the specs say.

when i understand it correctly ;) if not then not, like this its not recognised correctly from some apps cause there are extra / results ...

same on my 2nd sample (without total episode amount), season 5 ...

4/ . 3/ . / <
4.3.<

and the sample from the spec site u linked to

<episode-num system="xmltv_ns">2 . 9 . 0/1</episode-num>

only a / when there is a total amount behind, otherwise its regex ;)

RE: xmltv from tvheadend with category and episode infos - Added by Em Smith about 6 years ago

Thanks for the examples.

I think the extra slashes are valid since the spec says you can give X/Y and can omit any numbers that are not known. So "2", "2/", "/2", and "2/3" should all be valid.

But, since the downstream doesn't parse it, it's an easy fix and the other syntax is probably clearer. A pull request will be available shortly so only add a slash if there is a count.

RE: xmltv from tvheadend with category and episode infos - Added by Em Smith about 6 years ago

We now have these formats outputted:

  <episode-num system="xmltv-ns">2 . 24/25 .   </episode-num></programme>
  <episode-num system="xmltv-ns"> . 233 .   </episode-num></programme>
  <episode-num system="xmltv-ns">2/2 . 25 .   </episode-num></programme>
  <episode-num system="xmltv-ns">22/30 . 9/22 .   </episode-num></programme>

RE: xmltv from tvheadend with category and episode infos - Added by M A Ben Amara about 6 years ago

i guess that should be perfect, thanks again.

    (1-10/10)