Trigger single recording. How?

Post Reply
PhilB
Senior
Posts: 403
Joined: Sun May 11, 2014 6:23 pm
Great Britain

Trigger single recording. How?

Post by PhilB »

I have a query about recording rules and the 'Type' parameter.

If I Dvr/GetRecordSchedule with ChanId and StartTime for a program which is not scheduled for recording then it returns a record with 'Type' of 'Not Recording'.
Setting Type to 'Record All' (and also setting Station and LastRecorded) before POSTing a Dvr/AddRecordSchedule triggers a 'Record All'
recording successfully but how do I trigger a single recording?

Dvr/GetRecordScheduleList shows me that I have 332 instances of 'Record All' and one of 'Record Template' in my database.
There are no other 'Type' values so that is probably not the key.

Any advice appreciated.
Phil
User avatar
bill6502
Developer
Posts: 2307
Joined: Fri Feb 07, 2014 5:28 pm
United States of America

Re: Trigger single recording. How?

Post by bill6502 »

TYPES = (
"Single Record",
"Record All",
"Record One",
"Record Daily",
"Record Weekly",
)
From a python tool I wrote ages ago.
PhilB
Senior
Posts: 403
Joined: Sun May 11, 2014 6:23 pm
Great Britain

Re: Trigger single recording. How?

Post by PhilB »

Thanks Bill. You are a star!
The other 'Type' of course is 'Not Recording'.
What's the difference between 'Record One' and 'Single Record'?

A further question please, and it's a general one about the whole API interface.
If you wish to post text which includes the 'odd' characters such as ampersand, do you need to escape them? ' &' not '&' ?
Regards
Phil
User avatar
bill6502
Developer
Posts: 2307
Joined: Fri Feb 07, 2014 5:28 pm
United States of America

Re: Trigger single recording. How?

Post by bill6502 »

This should help. I believe Find One = Record One

I use: TitleRegEx="Penn & Teller: Fool Us", for example with Dvr/GetRecordedList
and it works. We use QUrl::toPercentEncoding in some common API code.
PhilB
Senior
Posts: 403
Joined: Sun May 11, 2014 6:23 pm
Great Britain

Re: Trigger single recording. How?

Post by PhilB »

Thanks Bill. I have found that when you GET an API it returns values which are encoded (eg & not &).
Writing these back unaltered seems to work so I presume that you only need to encode values in POST operations which have not been obtained from the backend. Probably a rare occurrence.
I'll try and find time to update Perl examples with a 'trigger a recording' example.
Phil
User avatar
bill6502
Developer
Posts: 2307
Joined: Fri Feb 07, 2014 5:28 pm
United States of America

Re: Trigger single recording. How?

Post by bill6502 »

I can't remember if you've tried v2 of the API, but on v32 and master use 6744 in place of 6544
to choose it. Just FYI.
Post Reply