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 »

Fixed.

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

Re: XMLTV guide data

Post by EddieP »

Thanks Verified ....
<programme start="20230322170000 +0000" stop="20230322173000 +0000" channel="US127676.hdhomerun.com">
<title>America's Court With Judge Ross</title>
<sub-title>Baby's Gotta Eat Too; Cloudy With a Chance of Lawsuits</sub-title>
<desc lang="en">Emotional distress and moving expenses; TV meteorologist.</desc>
<date>20141024</date>
<category>Series</category>
<category>Reality</category>
<category>Law</category>
<language>en</language>
<icon src="https://img.hdhomerun.com/titles/C8224483ENRXRI.jpg" width="360" height="270"/>
<series-id system="cseries">C8224483ENRXRI</series-id>
<episode-num system="dd_progid">EP01309893.0840</episode-num>
<previously-shown/>
</programme>

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

Re: XMLTV guide data

Post by mkolek99 »

nickk wrote: Sun Mar 12, 2023 7:35 pm 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.
How do I do that when tivimate wants a URL to the EPG? Or can you make mine static so it doesn’t change?

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

Re: XMLTV guide data

Post by EddieP »

I see the guide data provides 7 days of XMLTV is this by design ... ?

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

Re: XMLTV guide data

Post by nickk »

EddieP wrote: Wed Mar 15, 2023 2:00 pm I see the guide data provides 7 days of XMLTV is this by design ... ?
It provides the full 14 days.

kyl416
Posts: 550
Joined: Wed Sep 17, 2014 12:09 pm
Device ID: 1080DB11,1040501B
Location: Tobyhanna, PA
x 23
Contact:

Re: XMLTV guide data

Post by kyl416 »

Some software like Kodi only uses the first category to do things like EPG genre colors for News, Children, Action, Sports, Comedy, Drama, Reality, Game Shows, etc. Putting Series or Movies first broke that functionality.

So ideally, the added "Series" or "Movies" category should be last, and the rest should be in the order provided by your guide data supplier Gracenote.

i.e. the example of America's Court with Judge Ross should be:
<category>Reality</category>
<category>Law</category>
<category>Series</category>

tmm1
Posts: 291
Joined: Tue Nov 03, 2015 12:03 pm
Contact:

Re: XMLTV guide data

Post by tmm1 »

Most examples I have seen use Series and Movies first. My software relies on it appearing first.

kyl416
Posts: 550
Joined: Wed Sep 17, 2014 12:09 pm
Device ID: 1080DB11,1040501B
Location: Tobyhanna, PA
x 23
Contact:

Re: XMLTV guide data

Post by kyl416 »

Which specific software requires the movie/series category to be first? It goes against what xmltv.org's grabbers do, so you should probably file a bug report with the devleopers of your software.

Mythtv is the big one that requires the presence of a series or movie category, and is the reason why the XMLTV project's tv_grab_na_dd and tv_grab_zz_sdjson grabbers have code to manually add that category, but all of them don't put it as the first category, they use the genre order specified by Schedule Direct's upstream data supplier (also Gracenote) and insert Movie/Series last.

i.e. this is what I have from tv_grab_na_dd:
<category lang="en">Comedy</category>
<category lang="en">Movie</category>
and this is what tv_grab_zz_sdjson has:
<category>Comedy</category>
<category>movie</category>

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

Re: XMLTV guide data

Post by EddieP »

kyl416 wrote: Thu Mar 16, 2023 12:47 pm Which specific software requires the movie/series category to be first? It goes against what xmltv.org's grabbers do, so you should probably file a bug report with the devleopers of your software.

Mythtv is the big one that requires the presence of a series or movie category, and is the reason why the XMLTV project's tv_grab_na_dd and tv_grab_zz_sdjson grabbers have code to manually add that category, but all of them don't put it as the first category, they use the genre order specified by Schedule Direct's upstream data supplier (also Gracenote) and insert Movie/Series last.

i.e. this is what I have from tv_grab_na_dd:
<category lang="en">Comedy</category>
<category lang="en">Movie</category>
and this is what tv_grab_zz_sdjson has:
<category>Comedy</category>
<category>movie</category>
LOL He is the developer of Channels DVR.... a great piece of software.

kyl416
Posts: 550
Joined: Wed Sep 17, 2014 12:09 pm
Device ID: 1080DB11,1040501B
Location: Tobyhanna, PA
x 23
Contact:

Re: XMLTV guide data

Post by kyl416 »

My point still stands. If the widely used tv_grab_na_dd and tv_grab_zz_sdjson grabbers that are bundled as part of the official XMLTV project lists Movie/Series last, their software shouldn't expect it to always be the first category. They should look for the presence of those categories to determine what is a series or movie like Mythtv has been doing for the past 2 decades.

The standard every other XMLTV grabber uses is to present the genres in the same order their upstream source has them, and, if it's not already listed, insert any content type categories at the end, since a lot of xmltv based software uses the first/primary genre to set colors on the EPG and only display the first genre in places like an information box that changes as you move around the grid, or an info banner that appears as you change channels.
Last edited by kyl416 on Thu Mar 16, 2023 5:24 pm, edited 13 times in total.

tmm1
Posts: 291
Joined: Tue Nov 03, 2015 12:03 pm
Contact:

Re: XMLTV guide data

Post by tmm1 »

We can adapt. I'm just pointing out that making the change may break existing software as well.

It's too bad the xmltv spec doesn't let you specify category and genre separately.

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

Re: XMLTV guide data

Post by nickk »

Two ideas come to mind...

1) App could search the category tags for the following categories we use regardless of the location in the list:
Series, Movie, News, Special, Sport, Shop, Audio, Adult

2) We could add an attribute to the category tag to indicate the high level category vs genre.

Nick

emveepee
Posts: 155
Joined: Sun Nov 16, 2014 3:35 pm
x 4

Re: XMLTV guide data

Post by emveepee »

nickk wrote: Thu Mar 16, 2023 4:17 pm Two ideas come to mind...

1) App could search the category tags for the following categories we use regardless of the location in the list:
Series, Movie, News, Special, Sport, Shop, Audio, Adult

2) We could add an attribute to the category tag to indicate the high level category vs genre.

Nick
XML and JSON shouldn't really be considered to have order for de-serialization.

I don't think you need to do anything though, what I do for movies in my SiliconDust XMLTV JSON parser is map all MV identifiers to two fields,

<category>Movie</category>
and
<episode-num system="dd_progid">MV015462730000</episode-num>

Martin

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

Re: XMLTV guide data

Post by nickk »

Best not to use the Series or Episode ID to determine type. The guide data for Australia does not follow this convention for example.

emveepee
Posts: 155
Joined: Sun Nov 16, 2014 3:35 pm
x 4

Re: XMLTV guide data

Post by emveepee »

nickk wrote: Thu Mar 16, 2023 4:59 pm Best not to use the Series or Episode ID to determine type. The guide data for Australia does not follow this convention for example.
Thanks for that, as long as you don't use MV as your identifier for non-movies it probably isn't going to cause a problem. Is there sample JSON anywhere?

Martin

Post Reply