djp952 / pvr.hdhomerundvr

Unofficial Kodi HDHomeRun DVR PVR Client
https://github.com/djp952/pvr.hdhomerundvr/wiki
Other
60 stars 9 forks source link

Playback stops with HTTP 416 when seeking on an in-progress recording #66

Closed djp952 closed 4 years ago

djp952 commented 4 years ago

The report is that playback will stop and produce an HTTP 416: Range not satisfiable error when seeking on an in-progress recording at the (wall clock) time the recording ends.

My initial guess is that it's the response header transition from live (infinite length) to fully recorded (finite length). The response headers are captured at the time of the last open/seek operation and are only reloaded if another seek is performed. If the stream has transitioned from live to recorded, it's very possible that a seek beyond the end of the file is being attempted.

Initial guess at a resolution will be to watch for 416 more carefully again. Traps for this HTTP error were removed long ago as the underlying cause(s) were mitigated/refactored so they would never happen. If 416 is encountered during a seek, the new finite stream length data should be reported as part of that error, so the PVR should be able to adjust the seek parameters and retry.

djp952 commented 4 years ago

Guess turned out to be correct, and has been fixed via commit https://github.com/djp952/pvr.hdhomerundvr/commit/d20d8d86dd2bb08ca816f52224d1a42e1c72b669.

Will close issue when version 3.3.0 is formally released with this change.