[mythtv-users] mythfilldatabase behavior
Michael T. Dean
mtdean at thirdcontact.com
Thu Sep 27 08:47:22 UTC 2007
On 09/26/2007 08:06 PM, Darren wrote:
> On Thursday 27 September 2007 04:01, Jon Larson wrote:
>> I use mythfilldatabase --file to import program data from an XML file.
>> Not being a database expert, I assumed that mythfilldatabase basically
>> compares the mythtv listings to the XML file and does the following:
>> Programs that are missing in MythTV would be added, programs with
>> changed attributes would be updated, and programs that are missing in
>> the XML would be deleted from MythTV as well.
>> Unfortunately I'm finding that programs that are removed from the XML
>> file (like canceled programs) remain in Myth's upcoming program
>> listings. Is there a way to fix this? Is there a command equivalent to
>> "--refresh-all" for the --file function?
>> I've looked at the output from mythfilldatabase using "-v all" From this
>> I can see that the missing programs are not included in the 'MSqlQuery:
>> SELECT * FROM program' phase, but they are updated when "Marking episode
>> first showings" and "Marking episode first showings" are run.
>> If anyone could help with this I'd really appreciate it.
> This mysql command will delete all records in the program table. Then all you
> need to do is import your xmltv file again.
> DELETE FROM program;
Which, BTW, is basically already done by mythfilldatabase. Rather than
the approach that Jon expected, when mfdb is given new data for a
particular day for a particular video source, all listings for that
source on that day are deleted from the database (on a
channel-by-channel basis), then the new data is inserted. mfdb does not
update the listings data--it just deletes it then inserts the new.
So, if programs are sticking around, they probably exist in some other
video source or the mfdb command line is specifying a wrong video source
More information about the mythtv-users