[mythtv-users] Recovering recordings from Lost+Found

Jay Ashworth jra at baylink.com
Fri Nov 15 20:52:03 UTC 2013


----- Original Message -----
> From: "Robert Kulagowski" <rkulagow at gmail.com>

> On Fri, Nov 15, 2013 at 10:04 AM, Jay Ashworth <jra at baylink.com>
> wrote:
> > In other news, apparently, I'll have to write that lost+found
> > recovery script myself; let y'all know when I'm done. :-)
> 
> As long as you're doing that, create some code that adds metadata as a
> "subtitle", so that the MPEG file itself has data about what it is?
> 
> After writing your script, of course.

Hmmm.  

I'm talking about the problem where a program exists in the DB, but the 
base filename for that recording is no longer the same as what's in the
record in recorded, so the system can't simply find it by scanning the
configured storage groups for that filename, as happens now.  (PS: what
happens if Myth needs to do that scan, and the same filename exists in
more than one SG firectory?)

My plan was something like:

foreach FILE
do
  look in recorded by filesize
  if you get no hits, log it and move on
  if you get one hit
    if the ctime on the file matches the recorded date within a fuzz factor
      assume its the right one, and move the file to that location
      log the move, and move on
    else log it and move on
  if you get more than one hit 
    if you can match a date, as above, move, else scream for help
done

If that won't clear up most of the files I have in l+f, then the algorithm
needs more work.

Cheers,
-- jra
-- 
Jay R. Ashworth                  Baylink                       jra at baylink.com
Designer                     The Things I Think                       RFC 2100
Ashworth & Associates     http://baylink.pitas.com         2000 Land Rover DII
St Petersburg FL USA               #natog                      +1 727 647 1274


More information about the mythtv-users mailing list