[mythtv-users] Help needed for scripted recordings

Bill Meek keemllib at gmail.com
Fri Mar 27 23:58:16 UTC 2020


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...

===============================================================================
I've got an old python tool that *may* be a start (because it only schedules
lots of recordings.) It could be modified to remove them. I haven't been able
to schedule recordings for less than 1 minute. There is a --remove switch, but
it removes all rules just created.

$ vcr.py --chanid=1021 --length=1 --number=5 --wrmi --host=mc0 --dst

Creating 5 Single Record rules for channel 1021 (CBS2-HD.)
Each rule lasts 1 minute, total minutes: 5.

StartTime: 2020-03-27T23:36:00  EndTime: 2020-03-27T23:37:00  Result: RecordId=3596.
StartTime: 2020-03-27T23:37:00  EndTime: 2020-03-27T23:38:00  Result: RecordId=3597.
StartTime: 2020-03-27T23:38:00  EndTime: 2020-03-27T23:39:00  Result: RecordId=3598.
StartTime: 2020-03-27T23:39:00  EndTime: 2020-03-27T23:40:00  Result: RecordId=3599.
StartTime: 2020-03-27T23:40:00  EndTime: 2020-03-27T23:41:00  Result: RecordId=3600.

$ vcr.py -h
usage: vcr.py [-h] --chanid <chanid> [--autoexpire] [--debug] [--dst]
               [--digest <user:pass>] [--host <host>] [--length <1->60>]
               [--number <1->24>] [--priority <-99->99>] [--port <#>]
               [--remove] [--starttime <yyyy-mm-ddThh:mm>] [--wrmi] [--version]

Create Bulk Recording Rules

optional arguments:
   -h, --help            show this help message and exit
   --autoexpire          turn on the Auto Expire option (False)
   --debug               turn on debug messages (False)
   --dst                 turn on for Daylight Savings Time(False)
   --digest <user:pass>  digest username:password
   --host <host>         backend hostname or IP address (localhost)
   --length <1->60>      length (in minutes) of each rule (30)
   --number <1->24>      number of rules to create (1)
   --priority <-99->99>  rule priority (-5)
   --port <#>            backend Services API port (6544)
   --remove              remove all API rules for a chanid (False)
   --starttime <yyyy-mm-ddThh:mm>
                         1st rule's local start time (2020-03-27T18:30)
   --wrmi                actually send data to the backend (False)
   --version             show program's version number and exit

required argument:
   --chanid <chanid>     MythTV chanid, e.g. 1091

Defaults are in ()s

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


More information about the mythtv-users mailing list