[mythtv-users] bring back recordings

Mark Perkins perkins1724 at hotmail.com
Thu Jul 31 03:23:00 UTC 2014


Hi Daryl, sorry to say that I'm not quite clear on what your issue is. As others have said upgrading a frontend should not change anything on the backend, even on a combined BE/FE machine. Plus it appeared that you were upgrading the operating system to Ubuntu 14.04 so that really probably shouldn't have changed either the FE or BE.

Reading between the lines and with a bit of creative interpretation can I guess that you had a database (ie backend) backup, 5 more recordings were recorded after the backup was made, but you then inadvertently restored the (effectively out-of-date) backup without first creating a new up-to-date backup?

If I have guessed incorrectly then no need to read any further.

Otherwise if I have guessed correctly, and assuming that there is no good or current backup that can be simply restored then the most supported option would be to move the files to the video library and update metadata as appropriate.

However depending on how motivated you are to get the 5 recordings into the 'watch recordings' screens then there may be an alternative (as below) that while is not supported should be achievable.

Essentially the process is to create a random unwanted recording and then replace (some of) the details for that recording with the ones you want and link it to your previously recorded file.

Note this is far from perfect but should be achievable.

1) create an unneeded recording.
2) identify the channel id and starttime and file name of the unneeded recording by highlighting the recording in 'watch recordings' screen, press 'i' then 'i' again.
3) using your preferred GUI file manager or terminal window (on the backend) delete the file that belongs to the unneeded recording. You may need to search through the folders linked to your Recordings storage group to find it. Note this step is outside of MythTV, don't delete from within MythTV or you will need to start again. If you need help with this step just ask, happy to give more detail. Don't delete any needed files! You can always check that you are deleting the correct (unwanted) file by first playing it in VLC or your preferred media player program.
4) again using your preferred GUI file manager or terminal window rename the file that you want to restore into MythTV to be that of the file that you just deleted. Again if you need help please ask.
5) now need to run a command from a terminal window on the backend:

mythcommflag --rebuild --chanid="chanid-of-the-unneeded-recording" --starttime="starttime-of-the-unneeded-recording"

So the command will look something like:
mythcommflag --rebuild --chanid=1001 --starttime=20140730120000

This will 'fix' the seek table to reflect the recording you are restoring not the unwanted recording.

6) go back into MythTV 'watch recordings' screen, highlight the "unwanted" recording (which now links to your "needed" recording, press 'm', select 'recording options', 'change recording metadata' and update all the fields with the data that would correctly apply to your desired recording.
6a) if you want you may be able to find the correct title/subtitle/description from mythweb by doing an advanced search for your program but setting the timeframe from -2 weeks to +2 weeks (the program is now in the past but I think mythweb search defaults to +0 weeks to +2 weeks).
7) rerun metadata lookup and commercial detection from the jobs menu as needed.

As mentioned this is not perfect, most of the stored metadata (inc channel it was recorded on and time at which it was recorded and recording rule etc) will still reflect the unneeded recording as there are only a few fields that can be edited from the 'change recording metadata' screen but should be superficially suitable for what I have interpreted as your issue.

Repeat 5 times for your 5 recordings.

Hope this helps!



More information about the mythtv-users mailing list