[mythtv] Services API: Does Dvr/AddRecordSchedule work?
John P Poet
jppoet at gmail.com
Wed Oct 24 21:41:06 UTC 2018
On Fri, Oct 12, 2018 at 7:28 PM Bill Meek <keemllib at gmail.com> wrote:
>
> It does work. My usual 1st choice is: mythbackend --setverbose
> http:debug,upnp:debug
> (probably overkill.) And check the backend log...
>
> Here's a snippet from one of my tests:
>
> endpoint = 'Dvr/AddRecordSchedule'
>
> params_not_sent = ('AverageDelay', 'CallSign', 'Id', 'LastDeleted',
> 'LastRecorded', 'NextRecording', 'ParentId')
>
> for param in params_not_sent:
> try:
> del template[param]
> except KeyError:
> pass
> ...
>
>
> I also use:
>
> logging.basicConfig(level=logging.DEBUG if args['debug'] else
> logging.INFO)
>
> logging.getLogger('requests.packages.urllib3').setLevel(logging.WARNING)
> logging.getLogger('urllib3.connectionpool').setLevel(logging.WARNING)
>
> and a --debug switch to the Python program to activate the log messages.
> The
> send.py you're using has a bit more on the above.
>
> I attached my add_recording_rule.py FYI. The command line (just to test,
> without --wrmi):
> add_recording_rule.py --ho ofc0 --title Elementary --debug --digest
> admin:mythtv
>
Bill,
I am attaching my modifications to your work. Basically, I just added
support for manual recording rules. My next TODO is to add "power"
recording rule support. I called it mythtv_record.py so you can easily diff
it, to see what I added.
As a side note, the 500 error I was getting was because I did not have the
SearchType set correctly. It took my a bit to figure that out.
John
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mythtv.org/pipermail/mythtv-dev/attachments/20181024/b6e4e729/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mythtv_record.py
Type: text/x-python
Size: 16955 bytes
Desc: not available
URL: <http://lists.mythtv.org/pipermail/mythtv-dev/attachments/20181024/b6e4e729/attachment.py>
More information about the mythtv-dev
mailing list