Missing recordings after 4.0.x to 4.1/4.2 upgrade (now resolved)
Added by John Marshall over 7 years ago
Our household has been happily running tvheadend on a Debian server and watching TV via Kodi on a Raspberry Pi (OSMC) for several years. Some weeks ago I upgraded the server to the then-current 4.1.x version, causing most of the existing recordings to no longer appear via Kodi even though they were still visible in the web interface on the server. Today I've upgraded to 4.2.1-29~g21c97e1 and finally sorted out the missing recordings, which turned out not to really be any form of version mismatch even though I've kept the same .hts directory across several significant server updates.
The key was noticing that the recordings still visible were the ones created from Kodi, i.e., owned by the * anonymous user that the rpi connects to tvheadend as.
The tvheadend access permissions were originally created by tvheadend 3.9 or 4.0.x, and the * user had not really kept up with the tvheadend upgrades and only had Basic/HTSP in its Video Recorder access settings. Adding "View all" likely does the trick, but as the * user is only usable from our local network I just turned on everything under Video Recorder.
It was also necessary to force Kodi to notice the changes. Just doing Settings / PVR & Live TV / Clear data was not sufficient. Disabling and re-enabling the TVHeadend HTSP Client add-on probably works; the first time I succeeded was somewhat by accident: turning on TVHeadend HTSP Client / Configure / Advanced settings / Trace debugging has a side-effect of restarting Kodi's PVR subsystem, which definitely works.
Having sorted out the * access permissions on the server and ensured that Kodi on the client has noticed and/or reconnected, all recordings are now visible on the client as expected.
In retrospect, this all seems fairly obvious. However the effects visible on the client were completely mystifying until I studied the server web listing and realised the significance of the ownership of the recordings. So I'm posting this in case it's helpful for others with the same symptoms.
(Thank you very much to the maintainers of this great flexible software!)
Replies (2)
RE: Missing recordings after 4.0.x to 4.1/4.2 upgrade (now resolved) - Added by Kari Tiirikainen over 7 years ago
I had an issue upgrading from 4.0.10 to 4.2.2 also, all old recordings were listed as failed with cause time missed.
This is because the recording database format has changed in 4.2, filenames need to be listed in a files-section in the dvr log files.
I prepared a small python script based on the [https://github.com/tvheadend/tvheadend/blob/master/support/conf_migrate.py]] script that corrects this.
FIRST OF ALL : MAKE A BACKUP OF THE RECORDING DATABASE (backup all files in dvr/log/*)
Steps is used
1.Stop tvheadend service
root@tvhdvr:~# /etc/init.d/tvheadend stop
2.switch to tvheadend user (for me hts)
root@tvhdvr:~# su - hts
3.Backup files (twice to be sure..)
hts@tvhdvr:~$ mkdir -p /tmp/dvr/log
hts@tvhdvr:~$ mkdir -p /tmp/dvr_backup/log
hts@tvhdvr:~$ cp .hts/tvheadend/dvr/log/* /tmp/dvr/log
hts@tvhdvr:~$ cp .hts/tvheadend/dvr_backup/log/* /tmp/dvr/log
4. Migrate files (script will look for directory <path>/dvr/log, here <path> is /tmp)
hts@tvhdvr:~$ ./dvr_migrate.py /tmp
5.Copy files to proper place
hts@tvhdvr:~$ cp /tmp/dvr/log/* ~/.hts/tvheadend/dvr/log/
6.restart tvheadend service
hts@tvhdvr:~$ /etc/init.d/tvheadend start
After this all old recordings are again available.
Big thanks to the maintainers of this awsome software!
dvr_migrate.py (941 Bytes) dvr_migrate.py |
RE: Missing recordings after 4.0.x to 4.1/4.2 upgrade (now resolved) - Added by Graham H over 7 years ago
I just upgraded from 4.0.9 to 4.2.2 on OSMC with no problems with filenames.