[mythtv-users] Help needed for scripted recordings

Bill Meek keemllib at gmail.com
Sat Mar 28 13:25:27 UTC 2020

On 3/27/20 8:41 PM, David Engel wrote:
> On Fri, Mar 27, 2020 at 06:58:16PM -0500, Bill Meek wrote:
>> On 3/27/20 12:13 PM, Klaas de Waal wrote:
>>> Hi all,
>>> I am attempting to fix bug #13571 and to test this I need to start and then
>>> delete recordings lots and lots of times. It would be great if I can start
>>> a script that starts a recording on a specified channel, wait 10 seconds,
>>> delete the recording, wait 10 seconds, start a recording etc etc.
>>> And I then want to run another instance of the script on another channel,
>>> etc.
>>> Has anyone a script available that does something like this, or a basic
>>> example on how to build something?
>> If the 10 second length, is a requirement, no need to read further. Otherwise,
>> I might be able change the following to delete recordings automatically...
> Klaas can correct me if I'm wrong but I don't think 10 seconds is a
> hard and fast requirement.  The problem at hand seems to occur when
> deleting an in-progress recording but only occasionally.  I think the
> 10 seconds is solely to recreate the in-progress, deletion condition
> as frequently as possible in hopes of reproducing the problem more
> quickly.
> David



New version, you can run it from a remote host (FE.) It uses the Services API

  vcr.py --chanid=1021 --delete_while_recording --dst --host=<backend hostname or IP> --length=1 --number=5 --starttime=2020-03-28T13:16 --wrmi

will create 5 recording rules, 1 minute apart and 1 minute long. --starttime is
in local time and gets converted to UTC for the API.

30 seconds (length/2) after --starttime the 1st recording and it's rule are
deleted. Then every minute (length), the next recording and rule are deleted.

The --dst switch is a kludge and subtracts 3600 seconds from --starttime. Works
for North America.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: vcr.py
Type: text/x-python
Size: 12167 bytes
Desc: not available
URL: <http://lists.mythtv.org/pipermail/mythtv-users/attachments/20200328/a93b4729/attachment.py>

More information about the mythtv-users mailing list