Crude XMLTV Export

they're in the json that the dvr spits out if you ask it for a channels list via api.

After a quick look at tv_grab_zz_sdjson_sqlite I agree that this is the way to go. When I can find the time (ha!) I'll see what I can do. Ideally inside a docker that can live alongside @Maddox Pluto container hosted on the RaspPi image. :wink:

doesn't that require you to have a schedules direct account, though? parsing it from the DVR doesn't require an additional subscription...

The raw portion of the JSON in the guide data is (likely) how it is given to Channels from Gracenote. This format ought to be close enough to the JSON that Schedules Direct emits. With that established, you can modify tv_grab_zz_sdjson{,_sqlite} to query the Channels DVR server, take the raw object, and use the script to handle the heavy lifting.

I never said use the tv_grab_… scripts from the XMLTV as-is. Rather, I said use them as the starting point, and modify them as needed to handle the JSON that Channels emits. Usually having a foundation to build upon can be easier than trying to do it all from scratch.

1 Like

...which is why i used laravel. i never said i did it from scratch.

also, unless i'm missing something tv_grab_zz_sdjson isn't open source. how are you supposed to modify that?

i'm just not understanding how using that helps without having a SD account to attach it to. if i'm missing something obvious, please help me out...

Really? XMLTV isn't open source? The source code is readily available for all the grabbers.

of course the XMLTV format is readily available, but the source code for the grabbers is too? where?

that's why i said if i am missing something completely obvious please help me out...

yeah you beat me to it. i was editing my post, i didn't realize the grabbers were in there.

thanks. definitely a valid way to go if you're proficient in perl.

The main repository of the XMLTV project is hosted at Sourceforge, but can also be found on GitHub. The tv_grab_zz_sdjson grabber is a part of the XMLTV project, and can be found in those repositories.

The tv_grab_zz_sdjson_sqlite grabber is hosted separately on GitHub, and can be found here. (The author of this particular grabber can often be found on the SiliconDust forums under the handle gtb.)

Also, if you're curious about the actual XMLTV format, the you can view the DTD on GitHub.

(Edit: It looks like tv_grab_zz_sdjson_sqlite has been merged into the XMLTV project, as both grabbers are present in the grab subdirectory in the main repo.)

You modify the grabber, so that instead of querying the Schedules Direct servers, you point it to the endpoint of your own Channels DVR server.

yeah, scroll up a bit. @coolmaui pointed me in the right direction.

the XMLTV format was never an issue. i had been using that while developing my own parser. the part i missed was that they had the code for the grabbers up there too. i don't know how much they would have helped me, as it was pretty easy to just pick apart the json itself and apply it to the XMLTV output, but definitely could be helpful to someone else trying to do this if they have perl experience.

New in v2020.12.10.0059

3 Likes

will that work with any duration or only an hour?

Why would it be a parameter if it only worked with one value? :grinning:

2 Likes

i figured that was the answer, just wanted to make sure :slight_smile:

Much better than “?givemeanhourofxml=1”. :grin:

2 Likes

Well, considering the /devices/…/guide endpoint is already accepting the duration parameter from Channels' own native clients, it makes sense that the /devices/…/guide/xmltv endpoint would accept the same parameters.

Both endpoints also take a time= parameter which accepts a unix timestamp

1 Like

This is a great feature.
I must be doing something wrong though. I am only getting listings for the first few channels. What am I missing?