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: 1106
Joined: Fri Mar 25, 2016 9:55 am
x 4

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: 20163
Joined: Tue Jan 13, 2004 9:39 am
x 376

Re: XMLTV guide data

Post by nickk »

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

Nick

Online
EddieP
Posts: 440
Joined: Sat Jun 08, 2019 11:04 am
x 4

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

Online
EddieP
Posts: 440
Joined: Sat Jun 08, 2019 11:04 am
x 4

Re: XMLTV guide data

Post by EddieP »

@rpcameron

Nice find ...

Online
EddieP
Posts: 440
Joined: Sat Jun 08, 2019 11:04 am
x 4

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

bwarthen
Posts: 5
Joined: Wed Nov 17, 2021 7:57 pm

Re: XMLTV guide data

Post by bwarthen »

Hi again. I first want to say thanks for the fast turnaround on here. I would like to know now if we could get the video tag added with the aspect ratio I believe this will allow the HD filter in Plex to work with the xmltv guide data. Actually looks like that would be like this
<video>
<quality>HDTV</quality>
</video>

nickk
Silicondust
Posts: 20163
Joined: Tue Jan 13, 2004 9:39 am
x 376

Re: XMLTV guide data

Post by nickk »

bwarthen wrote: Thu Dec 09, 2021 10:15 am Hi again. I first want to say thanks for the fast turnaround on here. I would like to know now if we could get the video tag added with the aspect ratio I believe this will allow the HD filter in Plex to work with the xmltv guide data. Actually looks like that would be like this
<video>
<quality>HDTV</quality>
</video>
Added.

bwarthen
Posts: 5
Joined: Wed Nov 17, 2021 7:57 pm

Re: XMLTV guide data

Post by bwarthen »

Thanks I will check after I get home today.

bwarthen
Posts: 5
Joined: Wed Nov 17, 2021 7:57 pm

Re: XMLTV guide data

Post by bwarthen »

Worked like a charm. Thanks again for the quick turn around on this stuff.

chuckles67
Posts: 98
Joined: Tue Dec 10, 2013 8:38 am
x 1

Re: XMLTV guide data

Post by chuckles67 »

I'm seeing no new XMLTV guide data for the last six days - the downloaded XML file is empty (0 bytes). I'm using a bash script that downloads the XML file every day. My subscription is still valid (#609046). The HDHomeRun app (Mac) is showing guide data two weeks out. I've checked the device auth id from my HD HomeRun device is correct (it is stored in environment variable $KEY). The bash script, which has not been changed since May 2020, uses this command:

Code: Select all

curl --compressed api.hdhomerun.com/api/xmltv?DeviceAuth=$KEY > ~/Downloads/xmltvlist.xml
The resulting file is empty. Any suggestion how to debug?

djp952
Posts: 1619
Joined: Wed Oct 01, 2008 8:46 pm
Device ID: 131EB7F7;131ED0E0
Location: Elkridge, MD USA
x 24

Re: XMLTV guide data

Post by djp952 »

chuckles67 wrote: Wed Feb 02, 2022 8:26 am I'm seeing no new XMLTV guide data for the last six days - the downloaded XML file is empty (0 bytes). I'm using a bash script that downloads the XML file every day. My subscription is still valid (#609046). The HDHomeRun app (Mac) is showing guide data two weeks out. I've checked the device auth id from my HD HomeRun device is correct (it is stored in environment variable $KEY). The bash script, which has not been changed since May 2020, uses this command:

Code: Select all

curl --compressed api.hdhomerun.com/api/xmltv?DeviceAuth=$KEY > ~/Downloads/xmltvlist.xml
The resulting file is empty. Any suggestion how to debug?
Switch to https://api.hdhomerun.com, it should work again.

chuckles67
Posts: 98
Joined: Tue Dec 10, 2013 8:38 am
x 1

Re: XMLTV guide data

Post by chuckles67 »

djp952 wrote: Wed Feb 02, 2022 8:55 am Switch to https://api.hdhomerun.com, it should work again.
Added https:// and now it works. Thank you for the help!

Online
EddieP
Posts: 440
Joined: Sat Jun 08, 2019 11:04 am
x 4

Re: XMLTV guide data

Post by EddieP »

I am getting this error ....

curl: (60) SSL certificate problem: unable to get local issuer certificate
More details here: https://curl.haxx.se/docs/sslcerts.html

curl failed to verify the legitimacy of the server and therefore could not
establish a secure connection to it. To learn more about this situation and
how to fix it, please visit the web page mentioned above.


EDIT

Downloading latest Curl fixed it.

jeffc
Posts: 3
Joined: Wed Nov 30, 2022 6:56 pm

Re: XMLTV guide data

Post by jeffc »

is there a way to get *less* than 14 days of data. I'm working on building an independent roku app since the guide in the official one sucks and doesn't support scheduling DVR recordings.

Bric0044
Posts: 2
Joined: Thu Jan 12, 2023 8:18 pm

Re: XMLTV guide data

Post by Bric0044 »

I'm trying to add the xmltv address to tivimate and when I do it fails everytime. But when I put it into a browser it starts loading all the programming in the browser. What am I doing wrong? I enter: https://api.hdhomerun.com/api/xmltv?DeviceAuth=xxx xxx being my DeviceAuth. Thank you for any help

Nevermind it was a stupid mistake on my part. Works great.
Last edited by Bric0044 on Thu Jan 12, 2023 8:38 pm, edited 1 time in total.

Post Reply