[mythtv] mythfilldatabase bug

Andrew M. Bishop amb at gedanken.demon.co.uk
Thu Apr 29 14:04:40 EDT 2004

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

>Well, I had expected the *absence* of --no-delete to cause all the
>entries to be deleted, which is apparently not the case, as I get a lot
>of messages from cron about insert errors every day if I don't use
>--no-delete. And for principled reasons (such as "fix the bug instead of
>using stupid workarounds") I've tried to avoid using it, so I kinda
>wanted old data to get deleted without using the option.

The option could have been better named --selective-delete or
--only-delete-conflicts but at the time not deleting everything was my
primary concern which is why the option is named --no-delete.

>I suppose it's possible that the problem really is the xmltv grabber I'm
>using that grabs more data than it should (if it's told to grab data for
>Saturday, it might perhaps sometimes grab till 5 in the morning on
>Sunday or something), and that this breaks some expectations. Perhaps
>the patch I'd really want would be more like

The --no-delete option is not the solution to the problem that you
have so please don't change how it works.  It solves a different, but
related, problem.

Ed Wildgoose <lists at wildgooses.com> writes:

> I think this is certainly a real issue with a lot of grabbers
> (tv_grab_uk_rt for example).  The current code tries to delete all the
> entries for a *given* day, then runs the grabber to get the new data.
> Obviously if the grabber is returning too much data then it will cause
> insert errors.  I guess that there are various workarounds like doing a
> more selective delete before every insert, but it might be easier to
> just examine the data coming back from the grabber and mask off anything
> for the wrong day (actually will have to check, but I thought there was
> already code in CVS to do this?)

I think that you are both right about the date range that is being
grabbed.  If the grabber gets everything from 6am to 6am (like all of
the UK ones, not just the RT) then deleting everything from today will
still give problems when inserting today's data (since it will include
early tomorrow morning).

If this problem is fixed then you do not need to use the --no-delete
option unless you want to be on the safe side and only delete the
conflicts or you want to keep the past week's programs.

Andrew M. Bishop                             amb at gedanken.demon.co.uk

More information about the mythtv-dev mailing list