[mythtv-users] System event 'Recording started' triggered twice (MythTV-0.28)

Bill Meek keemllib at gmail.com
Sun Nov 26 19:49:13 UTC 2017


On 11/26/2017 12:17 PM, Rajil Saraswat wrote:
> Hello,
> 
> I am trying to setup 'System event' to trigger a channel change. I am
> using a cut down version of the script posted in the wiki
> (https://www.mythtv.org/wiki/IPTV_Encoders_as_a_Capture_Device#mythtv_recording_started.sh).
> It seems that the system event call is triggered twice whenever the
> channel is changed (rather than once). Here is the log when a channel is
> changed.
> 
> Log (/var/log/mythtv/MyScripts.log):
> 
> script mythtv_recording_started start
> 20171126060117 mythtv_recording_started.sh launch
> 20171126060117 recording_started.sh: CardID 5 Channel  2532
> 20171126060117 recording_started.sh: Cardid 5 change channel
> script mythtv_recording_started end
> script mythtv_recording_started start
> 20171126060118 mythtv_recording_started.sh launch
> 20171126060118 recording_started.sh: CardID 5 Channel  2532
> 20171126060118 recording_started.sh: Cardid 5 change channel
> script mythtv_recording_started end
> 
> The comment 'script mythtv_recording_started start' is called twice
> above. Any idea why the system event `Recording started` is invoked twice?

...

Don't know. If I schedule a recording, I only see it called once. It happens
in here:

     https://code.mythtv.org/cgit/mythtv/tree/mythtv/libs/libmythtv/tv_rec.cpp#n831

I'd do: mythbackend --setverbose record,system (on your running backend.) If
the backend is calling the routine twice, you'll see two lines similar to:

     ... StartedRecording(2607_2017-11-26T19:31:00Z) fn(/srv/mythtv-1/recordings/2607_20171126193100.ts)

Along with the system call to your script. Tested the above on 30-Pre (but not with
your script [that changes the channel after the recording started].)


-- 
Bill


More information about the mythtv-users mailing list