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

Re: XMLTV guide data

Post by nickk »

The error response text from the server will report the cause of the error, but most likely the problem is not requesting gzip compression.

Nick

mkolek99
Posts: 4
Joined: Sun Feb 19, 2023 5:04 pm

Re: XMLTV guide data

Post by mkolek99 »

Bric0044 wrote: Thu Jan 12, 2023 8:24 pm 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.
I’m getting a “not subscribed” blank page when I hit my URL with my device auth. Do you need to pay the $35 annual DVR service to be able to pull this data?

signcarver
Expert
Posts: 11083
Joined: Wed Jan 24, 2007 1:04 am
Device ID: 10A05954 10802091 131B34B7 13231F92 1070A18E 1073ED6F 15300C36
x 39

Re: XMLTV guide data

Post by signcarver »

Yes you need a valid dvr subscription. In theory a servio/scribe auth will also work for a year but if your access to dvr service is through one of those, you must also include it's DeviceAuth.

mkolek99
Posts: 4
Joined: Sun Feb 19, 2023 5:04 pm

Re: XMLTV guide data

Post by mkolek99 »

signcarver wrote: Sun Feb 19, 2023 5:18 pm Yes you need a valid dvr subscription. In theory a servio/scribe auth will also work for a year but if your access to dvr service is through one of those, you must also include it's DeviceAuth.

Thank you. I paid the money and plugged the URL into a new tivimate EPG, and all the channels have data now! :)

Johna
Posts: 2
Joined: Sun Mar 05, 2023 3:40 am

Re: XMLTV guide data

Post by Johna »

The XMLTV API for Australian EPG content doesn't appear to have a differentiator for movies vs TV shows that I can see?
dd_progid's all start with AU.

Code: Select all

<programme start="20230305091000 +0000" stop="20230305110000 +0000" channel="AU407827.hdhomerun.com">
<title>The Croods: A New Age</title>
<desc lang="en">
The prehistoric family the Croods are challenged by a rival family the Bettermans, who claim to be better and more evolved.
</desc>
<category>Family</category>
<language>en</language>
<icon src="https://img.hdhomerun.com/titles/AU402221.jpg" width="360" height="270"/>
<icon src="https://img.hdhomerun.com/posters/AU402221.jpg" width="240" height="360"/>
<series-id>AU402221</series-id>
<episode-num system="dd_progid">AU1082.2291</episode-num>
<new/>
</programme>

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

Re: XMLTV guide data

Post by nickk »

Johna wrote: Sun Mar 05, 2023 3:49 am The XMLTV API for Australian EPG content doesn't appear to have a differentiator for movies vs TV shows that I can see?
dd_progid's all start with AU.
The series ID is an ID - it isn't intended to be a differentiator for movies vs TV shows.

Does XMLTV have an official way to indicate a move vs a TV show?

signcarver
Expert
Posts: 11083
Joined: Wed Jan 24, 2007 1:04 am
Device ID: 10A05954 10802091 131B34B7 13231F92 1070A18E 1073ED6F 15300C36
x 39

Re: XMLTV guide data

Post by signcarver »

I believe they typically put it in the categories i.e. <category lang="en">Series</category> vs <category lang="en">Movie</category> though I think they might more officially use Film rather than Movie as I have seen a lot of scripts replace Film with Movie. Typically a show will have several categories.

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

Re: XMLTV guide data

Post by nickk »

Should the category tag be repeated multiple times as needed?

Billi23
Posts: 135
Joined: Mon Mar 20, 2017 8:08 pm
Device ID: 1323AADB

Re: XMLTV guide data

Post by Billi23 »

It should contain as many as necessary.
http://wiki.xmltv.org/index.php/XMLTVFormat

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

Re: XMLTV guide data

Post by nickk »

Try that...

Johna
Posts: 2
Joined: Sun Mar 05, 2023 3:40 am

Re: XMLTV guide data

Post by Johna »

You are a genius!
I can confirm this works. Thank you!

Code: Select all

<programme start="20230312094500 +0000" stop="20230312114500 +0000" channel="AU407760.hdhomerun.com">
<title>John Wick</title>
<desc lang="en">
An ex-hitman comes out of retirement to track down the gangsters that took everything from him.
</desc>
<category>movie</category>
<category>Action</category>
<language>en</language>
<icon src="https://img.hdhomerun.com/titles/AU319606.jpg" width="360" height="270"/>
<icon src="https://img.hdhomerun.com/posters/AU319606.jpg" width="240" height="360"/>
<series-id>AU319606</series-id>
<episode-num system="dd_progid">AU610.4014</episode-num>
<new/>
</programme>

mkolek99
Posts: 4
Joined: Sun Feb 19, 2023 5:04 pm

Re: XMLTV guide data

Post by mkolek99 »

I signed up for DVR earlier this year to be able to point tivimate to the HDHomeRun EPG.
I couple weeks ago the EPG no longer loaded.
I determined today that my auth code changed.
Why did my auth code change?
Please tell me this was a one time thing and not going to be a monthly occurrence?

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

Re: XMLTV guide data

Post by nickk »

The AuthCode changes several times a day and is good for up to 24 hours.

You need to pull the AuthCode each time you request guide.

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

Re: XMLTV guide data

Post by EddieP »

Here is a script that parses the id and puts it to a file... I am sure there is a simpler way, but this is how I do it.

Code: Select all

CD /d "%~dp0"
curl http://192.168.50.203/discover.json > devauth.json
python3.11 devauth.py
SET /P DEVICEID=<devauth.txt
curl --compressed https://api.hdhomerun.com/api/xmltv?DeviceAuth=%DEVICEID% -o CableEPG.xml
devauth.py

Code: Select all

#! /usr/bin/python

import json

json_file = 'devauth.json'

with open(json_file) as json_data:
    data = json.load(json_data)

json_data.close()

outfile=open('devauth.txt', 'w')

print (format(data['DeviceAuth']), file=outfile)

outfile.close()

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

Re: XMLTV guide data

Post by EddieP »

I noticed Series Category shows 2x uppercase and lower case.

Code: Select all

	<programme start="20230320020000 +0000" stop="20230320030000 +0000" channel="US58812.hdhomerun.com">
		<title>Uncharted Adventure</title>
		<sub-title>Turkey</sub-title>
		<desc lang="en">While exploring Turkey, Mike tries out a traditional Turkish bath and has one of the best camping trips of his life.</desc>
		<date>20230319</date>
		<category>series</category>
		<category>Series</category>
		<category>Documentary</category>
		<category>Travel</category>
		<language>en</language>
		<icon src="https://img.hdhomerun.com/titles/C20814443ENX3UM.jpg" width="360" height="270"/>
		<series-id system="cseries">C20814443ENX3UM</series-id>
		<episode-num system="dd_progid">EP04051546.0018</episode-num>
		<episode-num system="onscreen">S02E10</episode-num>
		<episode-num system="xmltv_ns">1.9.</episode-num>
		<previously-shown/>
		<video>
			<quality>HDTV</quality>
		</video>

Post Reply