[mythtv-users] When does mythfilldatabase trigger a schedule update?

chris at cpr.homelinux.net chris at cpr.homelinux.net
Sun Sep 3 15:01:20 UTC 2006

In a typical North American MythTV installation the 
"mythfilldatabase path" setting is "/usr/bin/mythfilldatabase".  
Once the data is downloaded by the grabber and the post-processing 
is completed, the backend recreates the "upcoming recordings" list 
based on the new data.  Question #1 is: does this rescheduling 
occur as a result of an explicit action my mythfilldatabase or is 
it done implicitly when the command specified in "mythfilldatabase 
path" exits successfully?  The reason I ask is because I wrote a 
small shell script that wraps mythfilldatabase and performs some 
updates to the 'program' table but don't know if I have to trigger 
a rechedule or if it will happen automatically when my wrapper 
exits.  Question #2 (assuming it's required) is: what command 
should I use to force mythbackend to reschedule?

For those who are curious, my wrapper looks like this:

[ ! -x /usr/bin/mythfilldatabase ] && exit 1
/usr/bin/mythfilldatabase $*
/usr/bin/mysql mythconverg <<-END
update program set subtitle=originalairdate
where subtitle='' and seriesid!='' and originalairdate is not null;
update program set subtitle='No subtitle.'
where subtitle='' and seriesid!='';
update program set description='No description.'
where description='' and seriesid!='';
exit 0

This is to get around the "bug" where dupe checking ignores empty 
subtitles/descriptions.  Although the devs assume an empty subtitle 
means that Zap2It didn't know what show would be airing and 
therefore MythTV should record everything, in my case the shows 
with blank subtitles quite often have an originalairdate value, 
which suggests that either the show never had a episode subtitle or 
else it just wasn't provided to Zap2It, but in either case Zap2It 
is well aware of what show will be broadcast and can uniquely 
identify it even if MythTV doesn't want to.

More information about the mythtv-users mailing list