dave-p/TVHadmin

Add currently recording to Recordings

Closed this issue · 2 comments

Whilst tvheadend is recording a program it is not shown in the Recordings screen. Using kodi such programmes do show up and you can watch them as they are being recorded. Neither the tvheadend nor TVHadmin have an easy way to view these files.

The attached patch (use -p3) adds these programmes to the Recordings page so you just need to press the play button. This is for the php version
include.zip
.

Hi, thanks for getting in touch.

You seem to be using a different version of TVHadmin.

In my version of include.php, get_recordings() uses API function /api/dvr/entry/grid which returns all recordings, past present and future. Your version instead uses a function get_finished_recordings() which uses API /api/dvr/entry/grid_finished to just get the finished recordings, then merges the output of grid_upcoming with a filter to return only recordings in progress. OK my version has to throw away the future recordings (timers) but I avoid the second return trip to the server.

I've checked my version, and recordings in progress are listed (with a grey background) and can be played while in progress.

Reviewing the code, there seems to be an error where the 'play' button is shown if a completed recording failed. I'll check and fix this if necessary.

Many apologies, this is completely my fault, did not check current source. In fact I'm pretty sure the change to finished_recordings was something I did while playing with the api and forgot to revert! Sorry for the noise. This program and the API documentation have been incredibly helpful.