[mythtv-users] Lost Recordings and Database

Stephen Worthington stephen_agent at jsw.gen.nz
Tue Jan 10 01:15:24 UTC 2023


On Mon, 9 Jan 2023 11:35:39 +0000, you wrote:

>Hi All,
>
>I wonder if someone with more knowledge of the Myth Database schema 
>might be able to advise me here. A friends Myth (0.32) system had a disk 
>tragedy and he has lost one of two volumes where the recordings are/were 
>held. The database entries for those recordings remain intact.
>
>Would it be possible to construct an SQL query that would take entries 
>after a specific date in the Recorded table and arrange for those 
>recordings to be entered into the Recording Schedules. In effect a 
>"Delete and Re-Record" operation.
>
>Many thanks
>
>Ken

That certainly sounds possible.  What you would want to do would be to
check all recordings and get the basename field for each file, then
check if the file can be found on disk.  If not, then do the delete
and re-record.  There are API calls to list recordings with various
filters, and there is an API to do delete.  I would have to check if
the delete API has a re-record option.  If so, it would not be a
particularly complicated bit of Python to do this.


More information about the mythtv-users mailing list