[mythtv-users] Different mythfilldatabase commands for different sources

Bill Meek keemllib at gmail.com
Thu Feb 11 01:28:03 UTC 2016


On 02/10/2016 05:34 PM, Ian Evans wrote:
> Then I ran the cron job for the UK grabber mentioned a few messages ago and
> the time did indeed change:
>
> <Value>2016-02-11T23:31:51Z</Value>
>
> BTW, running .27-fixes.

Found it, there is a 2nd place where it's updated and it simply adds
one day to the current time as you spotted.

So you could do:

     old_time=$(curl --silent BE:6544/Myth/GetSetting?Key=MythFillSuggestedRunTime|xml2|cut -f2 -d'=')
     run grabber
     run MFDB
     curl --silent --data Key=MythFillSuggestedRunTime --data Value=$old_time BE:6544/Myth/PutSetting

Which currently will fail in 0.28-beta . Also note that
there's no error checking on the above API endpoints, so if GetSetting fails, then the
PutSetting will add whatever junk was returned. Likely to be: </String>. A simple
regular expression like: if [[ "$old_time" =~ ....-..-..T..:..:..Z ]]; then... would
probably be enough.

I don't see a way to disable setting the time in MFDB.

-- 
Bill


More information about the mythtv-users mailing list