[mythtv] Patch for mythfilldatabase --no-delete

Oscar Carlsson webmaster at trekotor.se
Tue Mar 1 16:25:23 UTC 2005


Andrew M. Bishop wrote, On 2005-02-28 20:24:
> I am the original author of the --no-delete option to mythfilldatabase
> nearly two years ago, as I told Isaac at the time that I sent the
> patch:
> 
> : I have added a new option to mythfilldatabase, called '--no-delete'.
> : 
> : This option does two things:
> : 
> : 1) when it gets new data from XMLTV it won't delete the existing data
> :    day-by-day but program-by-program.  This means that if a single
> :    program changes between grabs of data by XMLTV it will only update
> :    that one.
> : 
> : 2) it only deletes programs from the database when they are more than
> :    a week old.
> 
> With the error that has been introduced between version 0.16 and 0.17
> the first of these doesn't get done.  This means that since there is
> already an identical progam in the database (because it wasn't
> deleted) the new program when added causes an SQL error.  Also a new
> program with a different start time causes two overlapping programs in
> the guide.
> 
> If you have not deleted the old programs from the database then you
> *must* check when inserting a new program that (a) it isn't already
> there and (b) that it doesn't overlap with an existing program.  The
> patch I sent restores part (b) of this behaviour so that it works
> again.
> 
> The help text is the same as version 0.16, and probably isn't perfect.
> A better description for the help text would be:
> 
> "--no-delete
>     Do not delete old programs from the database until 7 days old.
>     Delete programs only if conflicting not the whole day when updating."

Ok. Why don't we just make this behavior (the first one) the default (as 
it is now really), and make the --no-delete only do the second part?  At 
least that's the way I expected it to work.

No idea to remove the whole day if there is logic for smarter removal 
before inserting, don't you think?

But, anyway, if you look at the changes I made you can see (as far as I 
can remember) that the whole day _was_ indeed cleared in either case 
before entering that if-clause.

/Oscar


More information about the mythtv-dev mailing list