XMLTV guide data

Want to write your own code to work with a HDHomeRun or work with the HDHomeRun DVR? We are happy to help with concepts, APIs, best practices.
Post Reply
rpcameron
Posts: 1041
Joined: Fri Mar 25, 2016 9:55 am
x 6

Re: XMLTV guide data

Post by rpcameron »

nickk wrote: Mon Nov 22, 2021 10:33 am Where are you getting "17.13." from?
As stated above, the example given was S18E14, which in the 0-indexed xmltv_ns is 17.13.0.

From the XMLTV DTD:
xmltv_ns: This is intended to be a general way to number episodes and
parts of multi-part episodes. It is three numbers separated by dots,
the first is the series or season, the second the episode number
within that series, and the third the part number, if the programme is
part of a two-parter. All these numbers are indexed from zero, and
they can be given in the form 'X/Y' to show series X out of Y series
made, or episode X out of Y episodes in this series, or part X of a
Y-part episode. If any of these aren't known they can be omitted.
You can put spaces whereever you like to make things easier to read.

(NB 'part number' is not used when a whole programme is split in two
for purely scheduling reasons; it's intended for cases where there
really is a 'Part One' and 'Part Two'. The format doesn't currently
have a way to represent a whole programme that happens to be split
across two or more timeslots.)

Some examples will make things clearer. The first episode of the
second series is '1.0.0/1' . If it were a two-part episode, then the
first half would be '1.0.0/2' and the second half '1.0.1/2'. If you
know that an episode is from the first season, but you don't know
which episode it is or whether it is part of a multiparter, you could
give the episode-num as '0..'. Here the second and third numbers have
been omitted. If you know that this is the first part of a three-part
episode, which is the last episode of the first series of thirteen,
its number would be '0 . 12/13 . 0/3'. The series number is just '0'
because you don't know how many series there are in total - perhaps
the show is still being made!

nickk
Silicondust
Posts: 17457
Joined: Tue Jan 13, 2004 9:39 am
x 106

Re: XMLTV guide data

Post by nickk »

Added. Note that it is only generated for SxxExx style episodes.

Nick

EddieP
Posts: 331
Joined: Sat Jun 08, 2019 11:04 am
x 2

Re: XMLTV guide data

Post by EddieP »

signcarver wrote: Mon Nov 22, 2021 10:44 am My understanding is that is what they are apparently using for <episode-num system="xmltv_ns">17.13.</episode-num>

<episode-num system="xmltv_ns">s.e.p/t</episode-num>
Where s is the season number minus 1.
Where e is the episode number minus 1.
Where p is the part number minus 1.
Where t to the total parts (do not subtract 1)

Personally if I designed such I would have not subtracted 1 and then used 0 as a catch all for things without
Yep.... This is what to it looks like in the XML and Plex Guide ...

Code: Select all

	<programme start="20211122180000 +0000" stop="20211122190000 +0000" channel="US30306.hdhomerun.com">
		<title>Walker, Texas Ranger</title>
		<sub-title>Mr. Justice</sub-title>
		<desc lang="en">Trouble erupts at a boot camp for young criminals when one of them is shot and killed during an escape attempt.</desc>
		<date>19971122</date>
		<category>Series</category>
		<category>Crime drama</category>
		<category>Western</category>
		<language>en</language>
		<icon src="http://img.hdhomerun.com/titles/C184128EN8E2M.jpg" width="360" height="270"/>
		<series-id system="cseries">C184128EN8E2M</series-id>
		<episode-num system="dd_progid">EP00067264.0127</episode-num>
		<episode-num system="onscreen">S06E09</episode-num>
    <episode-num system="xmltv_ns">5.8.</episode-num>
		<previously-shown
Image

EddieP
Posts: 331
Joined: Sat Jun 08, 2019 11:04 am
x 2

Re: XMLTV guide data

Post by EddieP »

@rpcameron

Nice find ...

EddieP
Posts: 331
Joined: Sat Jun 08, 2019 11:04 am
x 2

Re: XMLTV guide data

Post by EddieP »

nickk wrote: Mon Nov 22, 2021 11:11 am Added. Note that it is only generated for SxxExx style episodes.

Nick
I noticed you added this .... Thanks

Code: Select all

	<programme start="20211201210000 +0000" stop="20211201220000 +0000" channel="US20378.hdhomerun.com">
		<title>Days of our Lives</title>
		<desc lang="en">Set in the fictional Midwestern town of Salem, this long-running saga follows the lives, loves, triumphs and tragedies of the Horton, Brady, Kiriakis, Hernandez and DiMera families. Love stories, family troubles and suspenseful adventures embroil the denizens of Salem in every form of drama from flowering courtships, love triangles and unexpected wedding day reveals to custody battles, switched identities, murder investigations, lingering comas, mental illness, kidnappings, amnesia cases and more.</desc>
		<date>20211201</date>
		<category>Series</category>
		<category>Soap</category>
		<language>en</language>
		<icon src="http://img.hdhomerun.com/titles/C183909EN0AZ2.jpg" width="360" height="270"/>
		<series-id system="cseries">C183909EN0AZ2</series-id>
		<episode-num system="dd_progid">EP00001189.5605</episode-num>
		<episode-num system="onscreen">S57E52</episode-num>
		<episode-num system="xmltv_ns">56.51.</episode-num>
		<new/>
	</program

Post Reply