Unofficial Kodi HDHomeRun DVR PVR Client

Kodi Community Development

Moderator: TVJunkie198

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

Re: Unofficial Kodi HDHomeRun DVR PVR Client

Post by djp952 »

My pleasure, glad I finally understood what you were looking for, it's a nice addition!

I want to see if there are any changes needed to solve usafle's problem and do some actual testing against the RECORD 20200318 when configured in a pool with 20200225, but then I will make these changes official and get them out for everyone.

gregeeh
Posts: 28
Joined: Thu Apr 09, 2020 8:27 pm
Location: Sydney, Australia

Re: Unofficial Kodi HDHomeRun DVR PVR Client

Post by gregeeh »

One thing I have noticed is you don't get a message starting "Recording of XXX Started" or "Recording of XXX Completed". Using the "padded" times.

TvH used to show up these messages, similar to how you get a message when you have added a Recording.

Don't know if it is supposed to do it or not?

TIA

Greg

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

Re: Unofficial Kodi HDHomeRun DVR PVR Client

Post by djp952 »

gregeeh wrote:
Wed Apr 15, 2020 6:59 pm
One thing I have noticed is you don't get a message starting "Recording of XXX Started" or "Recording of XXX Completed". Using the "padded" times.

TvH used to show up these messages, similar to how you get a message when you have added a Recording.

Don't know if it is supposed to do it or not?

TIA

Greg
Were you using Kodi with TVHeadend? I'm not aware of any in-built functionality for this, but that certainly doesn't mean it's not there. There is the option in PVR & Live TV / Recording -> "Display a notification on timer updates", but I find that to be really annoying so I have it turned off. IIRC that doesn't do what you'd want anyway and it would say "Timer" in the banner message.

Such a thing could be done in the PVR addon if you want me to look into it. It wouldn't have been possible in the past since the "Timers" view used to list every possible episode that might be recorded, but now that it's under control (and even moreso with your change in place), there is already a task scheduler in the addon that could fairly easily be set up to send the notifications. The only real concern I have thinking about this out loud is that the PVR doesn't get any type of notification from the DVR engine for these events, so they would still be based on metadata, much like the "red dot" in the Kodi EPG. Just because the dot is there or you got a "Recording XXX started" message doesn't necessarily mean the DVR is actually doing anything. The DVR could be completely offline and you'd still get the notification.

Kodi itself already knows when something starts/ends (again it does the "red dot" thing), I would think this would be best handled by Kodi if it's not already there, but would be fine with making it a PVR option if not. I'll add it to the Development Backlog (post 3 or 4 on this thread) so I don't forget about it.

If you were using Kodi as the frontend to TVHeadend via their PVR addon, please let me know. I can go look at how they did it to see if I'm missing something or if it was a custom thing like I think it might need to be.

I love it when new folks kick the wheels on this thing; so much has changed over the past 3 years ideas and concepts that would have been "OMG, you don't want that and here's why .." can become "sounds good to me, let's make it happen". :)

edit: Kodi 19 Matrix does have improved support for this, I'd have to look at how it handles it from the front-end perspective to see if it's notifications or something else. But support for the concept itself is present.

gregeeh
Posts: 28
Joined: Thu Apr 09, 2020 8:27 pm
Location: Sydney, Australia

Re: Unofficial Kodi HDHomeRun DVR PVR Client

Post by gregeeh »

djp952 wrote:
Wed Apr 15, 2020 7:24 pm
Were you using Kodi with TVHeadend? I'm not aware of any in-built functionality for this, but that certainly doesn't mean it's not there. There is the option in PVR & Live TV / Recording -> "Display a notification on timer updates", but I find that to be really annoying so I have it turned off. IIRC that doesn't do what you'd want anyway and it would say "Timer" in the banner message.

Such a thing could be done in the PVR addon if you want me to look into it. It wouldn't have been possible in the past since the "Timers" view used to list every possible episode that might be recorded, but now that it's under control (and even moreso with your change in place), there is already a task scheduler in the addon that could fairly easily be set up to send the notifications. The only real concern I have thinking about this out loud is that the PVR doesn't get any type of notification from the DVR engine for these events, so they would still be based on metadata, much like the "red dot" in the Kodi EPG. Just because the dot is there or you got a "Recording XXX started" message doesn't necessarily mean the DVR is actually doing anything. The DVR could be completely offline and you'd still get the notification.

Kodi itself already knows when something starts/ends (again it does the "red dot" thing), I would think this would be best handled by Kodi if it's not already there, but would be fine with making it a PVR option if not. I'll add it to the Development Backlog (post 3 or 4 on this thread) so I don't forget about it.

If you were using Kodi as the frontend to TVHeadend via their PVR addon, please let me know. I can go look at how they did it to see if I'm missing something or if it was a custom thing like I think it might need to be.

I love it when new folks kick the wheels on this thing; so much has changed over the past 3 years ideas and concepts that would have been "OMG, you don't want that and here's why .." can become "sounds good to me, let's make it happen". :)

edit: Kodi 19 Matrix does have improved support for this, I'd have to look at how it handles it from the front-end perspective to see if it's notifications or something else. But support for the concept itself is present.
I've been doing some more testing and it does throw up a recording started message at the padded times, but not always. I would say about 50% of the time it does not give a message, and when it does not you also do not get the "Currently Recording" window in the TV Library. The recordings do actually start as I can see the files increasing in size on the NAS. Also I have sometimes had the "Started Recording" and the "Currently Recording" window come up several minutes after the recording has started, and not the "unpadded" start time either.
If you were using Kodi as the frontend to TVHeadend via their PVR addon, please let me know. I can go look at how they did it to see if I'm missing something or if it was a custom thing like I think it might need to be.
Yes, I was using Kodi with TvH Server and Client on the same box, Odroid N2, until the last firmware update of HDHR killed TvH Server, Hence why I'm looking for an alternative. The Started and Completed messages I believe come from the Settings | PVR & Live TV / Recording | "Display a notification on timer updates" so Kodi seems to "thinks" the recordings have not started/completed sometimes.

Don't know if this has helped or confused the situation more.

Greg

EDIT: Yesterday I had Bold & The Beautiful to record from 4:30PM with 5 min start and 15 min end paddings. So it should have recorded from 4:25PM to 5:15PM, which it did. However there was no Recording Started message and no Currently Recording in the TV Library Screen. But wait at 5:47PM up pops a message saying Recording has Completed. So weird! The NAS shows a recording length of 50mins which is correct.

jarrah
Posts: 12
Joined: Thu Feb 20, 2020 2:59 pm

Re: Unofficial Kodi HDHomeRun DVR PVR Client

Post by jarrah »

bzz wrote:
Tue Mar 31, 2020 2:32 pm
Hi Jarrah, Thanks for the compliment. To achieve this I edited the default Estuary skin. I like the other Estuary skin areas & features but the EPG was not suited to my taste. Keep in mind I'm no Kodi skinning expert and am only using this with Kodi v18 on Windows PC's with a 16:9 aspect ratio. It may not work in other Kodi versions or look good on other devices, and I may have broken things in features that I don't use. I've also made changes to additional PVR views not just the Guide view pictured. To use these edited files, save or copy the contents of each pastebin below to an xml file with the name shown.

MyPVRChannels.xml - https://pastebin.com/uECKD1Zp
Includes_PVR.xml - https://pastebin.com/2Y5VWvyE
Defaults.xml - https://pastebin.com/R6w1acYb

You have two options as far as how to implement these changes.

Option 1 - Overwrite existing files.
Copy the 3 files to C:\Program Files\Kodi\addons\skin.estuary\xml or wherever you have kodi installed. Keep in mind that these will get overwritten if there's an update to the Estuary skin.

Option 2 - Make your own version of the Estuary skin.
Copy the skin.estuary folder (Located by default at C:\Program Files\Kodi\addons\ on Windows) to %AppData%\Roaming\Kodi\addons.
Rename the copied skin.estuary to something else, I used skin.estuary-bzz.
In the skin.estuary-bzz folder, edit the addon.xml changing the 2nd line to:

Code: Select all

<addon id="skin.estuary-bzz" version="2.0.27" name="Estuary BZZ" provider-name="custom skin">
Towards the bottom of the file you'll see a <source> tag.

Code: Select all

<source>https://github.com/xbmc/skin.estuary/</source>
Change that to:

Code: Select all

<source></source>
These steps will show a new skin option named Estuary BZZ and will keep it from updating automatically. You may need to enable the addon before you can activate it as a skin.

EDIT
I forgot a few of the xml files. Install options are the same, just include these files as well.
MyPVRGuide.xml - https://pastebin.com/mbsX5qHj
MyPVRRecordings.xml - https://pastebin.com/HFKAxj9v
@bzz Finally got round to implementing this! I can confirm it works a treat and looks sooo much better than the default guide. Thank you very much!!

New:
Image

vs old:
Image

bzz
Posts: 28
Joined: Sat Jul 11, 2015 8:43 pm

Re: Unofficial Kodi HDHomeRun DVR PVR Client

Post by bzz »

jarrah wrote:
Fri Apr 17, 2020 6:24 am
@bzz Finally got round to implementing this! I can confirm it works a treat and looks sooo much better than the default guide. Thank you very much!!
You're welcome! Happy to hear it worked out!

cncb
Posts: 76
Joined: Mon Jul 13, 2009 7:56 pm

Re: Unofficial Kodi HDHomeRun DVR PVR Client

Post by cncb »

Watching a recording in progress works very well until the DVR stops recording the program. Playback unexpectedly stops in Kodi and the resume point is lost. Is there anything that can be done about this or is it a Kodi issue? My client is NVidia Shield (Android TV) and my DVR is Windows 10. Thanks.

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

Re: Unofficial Kodi HDHomeRun DVR PVR Client

Post by djp952 »

Hi! What happens here is that there are two distinct types of playback in Kodi: Live and Recorded. The expectation for Recordings are different than Live. Technically I could do something to detect a recording in progress and just use the Live stream instead so it would keep going but you get some ugliness in the UI (position bar and times will be funky) and things like Resume position stop working.

The other big problem is that Live streams can't be seeked backward beyond the point you started the stream. So if you jumped into a recording half-way and used the Live channel instead, you can't go backwards from that point without stopping and starting over from the Recorded stream.

I think it's a valid point, but my opinion is that the architecture of Kodi PVRs wouldn't be able to do what you want seamlessly. There would need to be some sort of "Switch to Live channel after playback of in progress Recordings" thing, and even then all that could do is simulate the user tuning it manually after the recording stopped. At least right now :)

cncb
Posts: 76
Joined: Mon Jul 13, 2009 7:56 pm

Re: Unofficial Kodi HDHomeRun DVR PVR Client

Post by cncb »

Thanks for the reply. I don't think I explained this properly. I am watching an in-progress recording from the beginning after it has recorded several minutes, not watching it "live/real-time". Say a recording is scheduled from 8-9 PM. I start watching at 8:30 and when it hits 9:00 and the recording is finished, even though my current playback position is well behind the end of the recording, playback suddenly stops in Kodi and the resume position is lost. I'm not trying to watch the live stream past the end of the recording.

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

Re: Unofficial Kodi HDHomeRun DVR PVR Client

Post by djp952 »

cncb wrote:
Sun Apr 19, 2020 8:05 am
Thanks for the reply. I don't think I explained this properly. I am watching an in-progress recording from the beginning after it has recorded several minutes, not watching it "live/real-time". Say a recording is scheduled from 8-9 PM. I start watching at 8:30 and when it hits 9:00 and the recording is finished, even though my current playback position is well behind the end of the recording, playback suddenly stops in Kodi and the resume position is lost. I'm not trying to watch the live stream past the end of the recording.
Ah, OK I understand. I agree that shouldn't happen, playback should continue until the end of the recording, regardless of the wall clock time. Let me have a look and see if it's something I'm doing wrong (likely based on the scenario). To make sure I'm comparing apples to apples, are you using Kodi Leia 18.6, or some other version?

One follow-up, is/was the recording itself intact, or did it get truncated at the point where it stopped playback? Just want to make sure it wasn't the DVR ending it prematurely or something weird like that.

If I can't reproduce, I may need to ask for you to do the same thing again so we can capture the Kodi log to see if the PVR raised an error at that time. In that case, you should have gotten a banner notification as well like "Unable to play stream", so I seriously doubt an error occurred. My bet is that it has to do with the "stream times" that are reported to Kodi, in-progress recordings fall in this weird gray area between Live and Recorded, the way I try to get a stream with an unknown length to look right is most likely where the error lies.

cncb
Posts: 76
Joined: Mon Jul 13, 2009 7:56 pm

Re: Unofficial Kodi HDHomeRun DVR PVR Client

Post by cncb »

djp952 wrote:
Sun Apr 19, 2020 9:32 am
To make sure I'm comparing apples to apples, are you using Kodi Leia 18.6, or some other version?

One follow-up, is/was the recording itself intact, or did it get truncated at the point where it stopped playback? Just want to make sure it wasn't the DVR ending it prematurely or something weird like that.
Yes, Leia 18.6. The recording seems fine. I just have to manually skip ahead from the beginning to the point where it stopped to finish watching.

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

Re: Unofficial Kodi HDHomeRun DVR PVR Client

Post by djp952 »

cncb wrote:
Sun Apr 19, 2020 10:19 am
djp952 wrote:
Sun Apr 19, 2020 9:32 am
To make sure I'm comparing apples to apples, are you using Kodi Leia 18.6, or some other version?

One follow-up, is/was the recording itself intact, or did it get truncated at the point where it stopped playback? Just want to make sure it wasn't the DVR ending it prematurely or something weird like that.
Yes, Leia 18.6. The recording seems fine. I just have to manually skip ahead from the beginning to the point where it stopped to finish watching.
No luck reproducing this yet. So far I'm seeing what I expected to see, I started a 30-minute recording and waited 15 minutes. Started the recording from the beginning at that point. The elapsed time counter continued to update the end point until the recording actually stopped, then it was fixed at 33:00. Playback continued the entire time and only stopped at the actual end of the recording.

Sadly, I think I need to ask you to reproduce again and capture the Kodi log file. You don't need to turn on debug logging or anything like that. You can paste the log at paste.kodi.tv and link it, or let me know and I will PM you an e-mail address to send it to. Please let me know if you need any assistance with getting the log file, depending on the platform it lives in varying locations :(

Sorry to make you do additional work on this, I checked the logic over and tested it three times, literally no dice yet.

cncb
Posts: 76
Joined: Mon Jul 13, 2009 7:56 pm

Re: Unofficial Kodi HDHomeRun DVR PVR Client

Post by cncb »

djp952 wrote:
Sun Apr 19, 2020 1:45 pm
Sadly, I think I need to ask you to reproduce again and capture the Kodi log file.
No problem. I will try to get a log this week. Thanks.

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

Re: Unofficial Kodi HDHomeRun DVR PVR Client

Post by djp952 »

cncb wrote:
Sun Apr 19, 2020 2:44 pm
djp952 wrote:
Sun Apr 19, 2020 1:45 pm
Sadly, I think I need to ask you to reproduce again and capture the Kodi log file.
No problem. I will try to get a log this week. Thanks.
I will keep trying as well. I'll open an Issue on GitHub to track. I need to do that more often. Will edit this with link later.

cncb
Posts: 76
Joined: Mon Jul 13, 2009 7:56 pm

Re: Unofficial Kodi HDHomeRun DVR PVR Client

Post by cncb »

I was able to get the log from when this happened last night. We started watching the in-progress recording "One World Together at Home" about an hour after it started recording. We were watching and skipping ahead until about 10 when the recording was scheduled to end and the playback unexpectedly stopped (we had about 20 minutes left in the recording to watch). I see this line in the log:

2020-04-18 22:03:41.127 T:1688 ERROR: AddOnLog: HDHomeRun DVR PVR Client: SeekRecordedStream: seek operation failed with exception: HTTP 416: Range Not Satisfiable

I'm not sure I used paste.kodi.tv properly but here is a link: https://paste.kodi.tv/elatipadex.kodi

Post Reply