[mythtv] Mythtv Show Verification Script (safe version)

Bruce Markey bjm at lvcm.com
Tue Jan 14 18:13:33 EST 2003


Nathan Langley wrote:
> Attached to this email is a non destructive version of the script I
> submitted earlier.  This one just prints a report and does not actually
> delete anything.

Thanks.

I've also seen the opposite case where a row is in the
recorded table but there is no file. The current behavior
is that the frontend will hang if you try to play it (but
this can be fixed) you may want to consider finding these
too. Also, did you consider doing once SELECT * and in the
beginning and storing the result in a hash? You could
sanity check that > 0 rows are returned and it would make
it easier the look for both files without entries and
entries without files.

> I am not imposing it, I am offering it.

Of course, no one had to use it but if someone chose to
trust your code, they would have been subject to the risk
you were willing to take. I tried to quickly think of
border cases but the first thought is that the tables do
change (mythweb doesn't work this week for example). There
is a possibility that in the future the queries could succeed
but nothing is matched in verify(). You are right to have
a disclaimer but I wouldn't feel comfortable offering
something where there is a plausible chance that it may
be destructive for others down the line.

Overall, your code is careful about pattern matching file
names (maybe /\.nuv$/ in place of /nuv/) and checking return
status from DBI.

--  bjm





More information about the mythtv-dev mailing list