API not calling SetRecordingLastPlayedPosition()?
#1
What are the conditions for PVR addon to call SetRecordingLastPlayedPosition?

I added the following line in the client code:

pCapabilities->bSupportsLastPlayedPosition = true;

This addition calls GetRecordingLastPlayedPosition (reads from backend) in log, but never calls SetRecordingLastPlayedPosition (sets in back end) when I press stop video on player.

Is there a different option I need to set somewhere?

I'm on Krypton 17.5
Reply
#2
(2018-01-13, 20:48)el_gonz87 Wrote: What are the conditions for PVR addon to call SetRecordingLastPlayedPosition?

I added the following line in the client code:

pCapabilities->bSupportsLastPlayedPosition = true;

This addition calls GetRecordingLastPlayedPosition (reads from backend) in log, but never calls SetRecordingLastPlayedPosition (sets in back end) when I press stop video on player.

Is there a different option I need to set somewhere?

I'm on Krypton 17.5


Is most probably buggy in 17. Try 18 nightly. I fixed this some time ago while working on the implementation for remote play count and resume points for pvr.hts
Reply
#3
I'm seeing this exact behavior with the current Leia branch.  It looks like this should be called from CPVRRecording::SetResumePoint (one of two overloads) but neither of these functions seems to be called.  What am I doing wrong?
Reply
#4
(2019-05-12, 03:03)MatthewLundberg Wrote: I'm seeing this exact behavior with the current Leia branch.  It looks like this should be called from CPVRRecording::SetResumePoint (one of two overloads) but neither of these functions seems to be called.  What am I doing wrong?
Hi Matt, I've found that on Leia you need to set the stream start time to zero in GetStreamTimes() before this API will be called.  It's actually documented in the PVR API header file that this value should be zero for recorded/finite streams.  For me, this means I won't get calls into SetRecordingLastPlayedPosition() for the "in-progress" recordings, since they are live/realtime and I report the actual wall clock start time so timeshifting and seek work as expected.

I don't remember exactly where in the Kodi code this was, but I debugged it back in February and this was my finding.  The code only recognized the stream as recorded if this was zero, so if you don't give it a zero it will bypass the call to SetRecordingLastPlayedPosition() since it's considered as Live.

Hope this helps.
Reply
#5
Yes, that helps.  It's odd behavior to be sure, but there it is.  I'm getting the callback.

I don't suppose you know if SD has documented the API call to set this in the record engine?  I found it pretty easily with Wireshark, but that doesn't give me the warm fuzzies.
Reply
#6
(2019-05-12, 05:07)MatthewLundberg Wrote: Yes, that helps.  It's odd behavior to be sure, but there it is.  I'm getting the callback.

I don't suppose you know if SD has documented the API call to set this in the record engine?  I found it pretty easily with Wireshark, but that doesn't give me the warm fuzzies.

SD's DVR documentation hasn't been updated in like 2.5 years -- I sniffed how to do this myself as well.  I append "&cmd=set&Resume=N" to the CmdURL string, where N is the number of seconds into the recording.  

I also find sniffing a bit wanky, but without documentation it's pretty much all we can do.

edit: Nice to know you are still working on yours, it's good to hear from you my friend.
Reply

Logout Mark Read Team Forum Stats Members Help
API not calling SetRecordingLastPlayedPosition()?0