[mythtv] trying to understand mythfilldatabase

Simon Kenyon simon at koala.ie
Wed Feb 6 14:07:39 UTC 2008


why does the status say:

Last mythfilldatabase run started on 2008-02-06 03:14 and ended on 
2008-02-06 03:16. mythfilldatabase ran, but did not insert any new data 
into the Guide for 4 of   sources. This can indicate a potential grabber 
failure.
There's guide data until 2008-02-12 06:00 (6 days).

when from the mythfilldatabase log i can see:

[snip]
2008-02-06 03:07:45.321 Updating source #1 (irishanalogue) with grabber 
tv_grab_uk_rt
2008-02-06 03:07:45.322 Found 4 channels for source 1 which use grabber
[snip]
2008-02-06 03:08:07.562 Updated programs: 98 Unchanged programs: 781
[snip]
2008-02-06 03:08:08.640 Updating source #2 (skydigital) with grabber 
tv_grab_uk_rt
2008-02-06 03:08:08.641 Found 165 channels for source 2 which use grabber
[snip]
2008-02-06 03:13:30.186 Updated programs: 926 Unchanged programs: 24775
[snip]
2008-02-06 03:13:30.619 Updating source #3 (freesatfromsky) with grabber 
tv_grab_uk_rt
2008-02-06 03:13:30.619 Found 32 channels for source 3 which use grabber
[snip]
2008-02-06 03:14:31.383 Updated programs: 130 Unchanged programs: 5019
[snip]
2008-02-06 03:14:31.845 Updating source #4 (freetoair) with grabber 
tv_grab_uk_rt
2008-02-06 03:14:31.846 Found 75 channels for source 4 which use grabber
[snip]
2008-02-06 03:17:06.338 Updated programs: 872 Unchanged programs: 13220
[snip]

so it updated 98+926+130+872 programmes, but claims that it did not 
insert any new data.
i just moved from doing the mytfilldatabase's outside myth in a cron job 
to doing it within myth, so have been keeping an eye on things.
i just want to understand what the status means.

looking at mythfilldatabase/main.cpp it does a query

SELECT MAX(endtime) FROM program p LEFT JOIN channel c ON 
p.chanid=c.chanid WHERE c.sourceid= <foo> AND manualid = 0;

before and after the run and compares the two. this say if new data was 
added at the end, but says nothing about modified data.
this can give the wrong impression.
in libs/libmythtv/programdata.cpp, ProgramData::handlePrograms() 
calculates the updated and unchanged values. could they be passed back 
to mythfilldatabase?
--
simon


More information about the mythtv-dev mailing list