[mythtv] mythfilldatabase bug

Andrew M. Bishop amb at gedanken.demon.co.uk
Mon Apr 26 12:21:35 EDT 2004


Ove Kaaven <ovehk at ping.uio.no> writes:

> It seems to me that the logic for --no-delete in mythfilldatabase is
> reversed; when the flag is absent, it does not delete old entries for
> me, but probably will if it's present. How about either something like
> this (untested change):

You don't say what version of myth you are using, but since I added
the --no-delete option I thought that I should answer.  The code in
myth version 0.14 is correct and does work.

The --no-delete option doesn't delete all the entries from the
database before grabbing new ones, but instead it deletes only the
entries that have changed after the grabber has run.  This means that
if you run mythfilldatabase from a cron job and it fails to download
anything one day you stil have the data you downloaded previously.
You don't have to check every day that the download was OK.

The other minor thing that it does is keep 1 week of old programs in
the EPG so you can see what you missed when you were away on holiday.

Even with this feature enabled you need to delete a program from the
database if there is a replacement with different data (changed
start/stop time, different title, subtitle).  If there is not change
then you don't do anything.

The code that you propose changing is the part that checks if there is
a change between the current program in the database and the one that
has been downloaded and deletes the old one.  If there is no
difference then nothing is added, if there is a difference the old one
is deleted and the normal code path is resumed to add the new one.

-- 
Andrew.
----------------------------------------------------------------------
Andrew M. Bishop                             amb at gedanken.demon.co.uk
                                      http://www.gedanken.demon.co.uk/


More information about the mythtv-dev mailing list