[mythtv-users] Can't use 'delete and allow rerecord' for recordings when the file is missing

Michael T. Dean mtdean at thirdcontact.com
Sat Feb 21 19:16:23 UTC 2009


On 02/21/2009 01:34 PM, David George wrote:
> On 02/21/2009 01:14 AM, jarpublic at gmail.com wrote:
>>> myth.find_orphans worked great for me after I patched it to allow
>>> re-record.
>>>  I posted my patch in ticket 4677 and it has been committed, but you
>>> need to
>>> be running trunk to get it.  The patch should work against fixes if
>>> you want
>>> to download and apply manually.  I also added a dryrun option so you
>>> can see
>>> what it is going to do before it does it.
>>>
>>> Link to thread about this:
>>> http://www.gossamer-threads.com/lists/mythtv/users/316801#316801
>>> Link to ticket: http://svn.mythtv.org/trac/ticket/4677
>>>     
>> That is good to know. I looked through the script myself and almost
>> started to add in the changes. It looked straightforward to add a
>> couple of lines to remove the record from oldrecorded in addition to
>> recorded. I know zero mysql though, and was fairly certain I would
>> muck it up. I got things to work by using touch to create some empty
>> files and then just did 'delete and allow re-record' from the
>> frontend. I'm just curious and I couldn't tell in the thread you
>> linked to, do your changes make it so it is the same as using the
>> 'delete and allow re-record' option, or does it remove the recordings
>> from the database entirely?
>
> Yes, it is the same as delete and re-record.  It sets duplicate to 0
> in oldrecorded which is the same as mythweb does (at least at the time
> I created the patch). 

No, MythWeb calls DELETE_RECORDING through the Myth protocol, then calls
FORGET_RECORDING through the Myth protocol (at least now--it may have
been different way back when you wrote that patch, but I don't care
enough to look).  I.e. instead of implementing the same functionality
that the backend (currently) implements, it asks the backend to do the
work for it.  That way, if the backend changes the procedure for
forgetting a recording (as it has done in the past when the duplicate
column was added and we stopped deleting records from the oldrecorded
table), we don't have to update 100 different pieces of code that "do it
themselves".

This is /exactly/ why myth.find_orphans.pl and myth.rebuild_database.pl
should both be deleted from Myth and if someone wants the functionality
in Myth, they can rewrite the scripts to use the MythTV Perl bindings. 
(Or, better, put the functionality in mythbackend, where it belongs.)

I'm not asking you to fix myth.find_orphans.pl.  I'm actually planning
on putting the functionality from the two completely overlapping scripts
into the backend, but just thought I'd mention the mess that is these
unmaintained legacy scripts.

Mike


More information about the mythtv-users mailing list