Change in 20200318 RECORD (Android) or defect?

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
djp952
Posts: 1188
Joined: Wed Oct 01, 2008 8:46 pm
Device ID: 131EB7F7;131ED0E0
Location: Elkridge, MD USA

Change in 20200318 RECORD (Android) or defect?

Post by djp952 »

Hi! There is a user having some problems with my application, and we were able to track it down to the RECORD engine he's using (20200318 on Android - nVidia Shield) returning links to individual series rather than the expected list of all recordings. For example:

Code: Select all

[
...
{"SeriesID":"C7931557ENEF4R","Title":"American Ninja Warrior","Category":"series","ImageURL":"http://img.hdhomerun.com/titles/C7931557ENEF4R.jpg","StartTime":1580090400,"EpisodesURL":"http://192.168.1.18:53123/recorded_files.json?SeriesID=C7931557ENEF4R","UpdateID":2774349706},
{"SeriesID":"C10783358EN9XX8","Title":"Angie Tribeca","Category":"series","ImageURL":"http://img.hdhomerun.com/titles/C10783358EN9XX8.jpg","StartTime":1546225200,"EpisodesURL":"http://192.168.1.18:53123/recorded_files.json?SeriesID=C10783358EN9XX8","UpdateID":805205525},
...
]
The URL being queried is the unqualified "/recorded_files.json" URL, nothing like a "?DisplayGroupID=series" is being added to the URL.

I would like to know if the upcoming RECORD will be doing this moving forward or if this is a problem that version. I do not see any changelogs or links to version 20200318, so I'm assuming on Android it inherits the version from the base package, I do see there was an Android release 20200318.

Thanks!

nickk
Silicondust
Posts: 15859
Joined: Tue Jan 13, 2004 9:39 am

Re: Change in 20200318 RECORD (Android) or defect?

Post by nickk »

Confirming, recorded_files.json has been changed to output series level information by default.

We recommend apps append "?DisplayGroupID=root" as this will output series level information on older releases of the record engine.

Nick

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

Re: Change in 20200318 RECORD (Android) or defect?

Post by djp952 »

Thanks for the prompt response as always, Nick! Will begin making adjustments.

signcarver
Expert
Posts: 8856
Joined: Wed Jan 24, 2007 1:04 am
Device ID: 131B34B7 13231F92 1070A18E 1073ED6F 15300C36

Re: Change in 20200318 RECORD (Android) or defect?

Post by signcarver »

Should we make assumptions as to what/how UpdateID is used?

nickk
Silicondust
Posts: 15859
Joined: Tue Jan 13, 2004 9:39 am

Re: Change in 20200318 RECORD (Android) or defect?

Post by nickk »

signcarver wrote:
Mon Apr 13, 2020 8:27 am
Should we make assumptions as to what/how UpdateID is used?
If UpdateID changes you need to re-fetch the episode information for that series.

We really should implement "if-modified" HTTP support... on the TODO list.

Nick

signcarver
Expert
Posts: 8856
Joined: Wed Jan 24, 2007 1:04 am
Device ID: 131B34B7 13231F92 1070A18E 1073ED6F 15300C36

Re: Change in 20200318 RECORD (Android) or defect?

Post by signcarver »

Thanks, that is what I figured it did but would hate to code making such assumption.

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

Re: Change in 20200318 RECORD (Android) or defect?

Post by djp952 »

I am having some problems with this. DisplayGroupID=root seems to allow for the return of duplicate values. On my DVR, it's returning 2 duplicates. This is from unprocessed data:

{"SeriesID":"MV005835330000","Title":"Tomorrowland","Category":"movie","ImageURL":"http://img.hdhomerun.com/titles/MV00583 ... 3214925643},
{"SeriesID":"MV005835330000","Title":"Tomorrowland","Category":"movie","ImageURL":"http://img.hdhomerun.com/titles/MV00583 ... 3214925643},

{"SeriesID":"C14199341ENNON4","Title":"Hotel Transylvania: The Series","Category":"series","ImageURL":"http://img.hdhomerun.com/titles/C141993 ... :261955481},
{"SeriesID":"C14199341ENNON4","Title":"Hotel Transylvania: The Series","Category":"series","ImageURL":"http://img.hdhomerun.com/titles/C141993 ... :261955481}

This is also an extremely inefficient way to get a list of all the recordings. I have to make 64 queries against the RECORD engine as opposed to the one for my own recordings. UpdateID seems like it might be useful in the future but since the changeset came without warning, I really don't have time to plan a whole new way of doing things.

Is there any way developers can be notified of breaking changes before they happen? I'm pretty upset about this one, especially since it wasn't published in the changelog and screws up existing functionality.

gtb
Expert
Posts: 4045
Joined: Thu Oct 06, 2011 1:00 pm
Location: Sunnyvale, CA USA

Re: Change in 20200318 RECORD (Android) or defect?

Post by gtb »

djp952 wrote:
Mon Apr 13, 2020 11:42 am
I'm pretty upset about this one, especially since it wasn't published in the changelog and screws up existing functionality.
I would agree that it would be nice to have an extended developer (only?) changelog, but AFAIK the officially documented APIs (on either the github or info.hdhomerun.com sites) are very limited, and don't formally document recorded_files.json (or, for that matter, those sites also do not document many of the other discovered urls or modifiers), so the API (and the schema itself) should arguably be considered not stable, and could change at any time when SD finds a better way for *their* solution. And as anyone who has written their own out-of-tree driver for linux knows, it can suck to try to keep up with API changes, and it is clearly even harder when one does not have any visibility that a change has occurred or what it implies. We have consistently been told that better developer docs will be made available in due course. By observation that time has not yet arrived.

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

Re: Change in 20200318 RECORD (Android) or defect?

Post by djp952 »

I can't really argue those points, but not having a breaking change at least mentioned in the changelog? If it was noted that a new DVR engine codebase was put in place on March 18 it wouldn't have been such a surprise in mid-April. The changelog is all we have to try to keep up until the Developer documentation is put in place, I don't think it's too much to ask that a new HDHomeRun RECORD version at least be mentioned, even if it's only on Android.

It would appear that this change will also break the official SiliconDust Kodi HDHomeRun addon as well, so there's that :)

NedS
Silicondust
Posts: 1070
Joined: Mon Dec 10, 2018 12:38 pm

Re: Change in 20200318 RECORD (Android) or defect?

Post by NedS »

We dropped the ball on this, and we're very sorry about that. In addition to better documentation, I will make it a point to test the Kodi DVR add-on whenever we have internal DVR tests, in addition to public DVR betas.

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

Re: Change in 20200318 RECORD (Android) or defect?

Post by djp952 »

Hi Ned, thanks! I would never expect SD to expend any time or resources on my little thing, that's fantastic, don't get me wrong, but I would feel a little bad about it. Honestly, just making sure the changelog is as complete as possible would be dandy, it was the first place I went to make sure I didn't miss something. It only became an issue since it was a breaking change, 95% of the time it wouldn't have mattered at all.

I think SD does plenty today to allow for other applications to use the hardware/software, I for one, have zero expectation that SD would take any additional steps until/unless the APIs were formally documented and supported by SD. In that case, there is more of a promise that if the API changes the documentation would change as well, and perhaps some wiggle room on when a change becomes active.

Just also wanted to point out that whomever maintains the SD HDHomeRun View script add-on should probably look at this as well, it appears that the new default RECORD schema will break that addon, it hits the base URL without DisplayGroupID=root as well.

Cheers, and thanks again!

NedS
Silicondust
Posts: 1070
Joined: Mon Dec 10, 2018 12:38 pm

Re: Change in 20200318 RECORD (Android) or defect?

Post by NedS »

Your work has actually helped us quite a bit. You're probably the most knowledgeable person for how our DVR works besides Nick (since he created it), and a number of ideas and improvements have resulted from looking at your work. I'm honestly surprised that the Team Kodi people haven't invited you to formally join them yet, as you probably understand the Kodi PVR system better than most.

IMO, the biggest strength of Silicondust has been not locking things down and making things accessible to other apps. We would love for lots of people to make their own interface/add-on/extension into the HDHomeRun DVR for various apps. We're all big fans of using open standards whenever possible, and want to make a larger effort into documenting our own APIs. We like our official HDHomeRun app, don't get me wrong, but we don't subscribe to the idea that one-size-fits-all. We want users to have options.

In other words, it helps us to help you.

Post Reply