[solved] API trigger manual recordings.

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

[solved] API trigger manual recordings.

Post by PhilB »

I want to trigger lots of manual recordings - say one minute recordings at (say) 5 minute intervals for a stress test.

I've successfully triggered recordings before with the api interface using
/Dvr/GetRecordSchedule?ChanId=... &StartTime=... and throw it back with Dvr/AddRecordSchedule
but it's not working this time and I think I'm not choosing the right parameters.

The parameters I'm seeing and changing are as follows.
This was at 2023-02-02T17:34:19Z

Code: Select all

Same:       AutoCommflag = false
Same:       AutoExpire = true
Same:       AutoMetaLookup = false
Same:       AutoTranscode = false
Same:       AutoUserJob1 = false
Same:       AutoUserJob2 = false
Same:       AutoUserJob3 = false
Same:       AutoUserJob4 = false
Same:       AverageDelay = 0
Same:       CallSign = BBC ONE Lon
Same:       Category = Entertainment
Same:       ChanId = 10001
Same:       Description = The quiz in which contestants try to score as few points as possible by plumbing the depths of their general knowledge to come up with the answers no-one else could think of.
Same:       DupIn = All Recordings
Same:       DupMethod = Subtitle then Description
Change ***  EndOffset = 2   to: 1
Change ***  EndTime = 2023-02-02T18:00:00Z   to: 2023-02-02T17:38:00Z
Same:       Episode = 42
Same:       Filter = 0
Same:       FindDay = 5
Same:       FindTime = 17:15:00.000
Same:       Id = 0
Same:       Inactive = false
Same:       Inetref = 
New:   ***  LastRecorded  = 
Same:       MaxEpisodes = 0
Same:       MaxNewest = false
Same:       NewEpisOnly = false
Same:       ParentId = 0
Same:       PlayGroup = Default
Same:       PreferredInput = 0
Same:       ProgramId = fp.bbc.co.uk/m/tv8z
Same:       RecGroup = Default
Same:       RecPriority = 2
Same:       RecProfile = Default
Change ***  SearchType = None   to: Manual
Same:       Season = 0
Same:       SeriesId = fp.bbc.co.uk/m-qv3c
Change ***  StartOffset = 2   to: 1
Change ***  StartTime = 2023-02-02T17:15:00Z   to: 2023-02-02T17:37:00Z
New:   ***  Station  = BBC ONE Lon
Same:       StorageGroup = Default
Same:       SubTitle = 
Change ***  Title = Pointless   to: Manual
Same:       Transcoder = 0
Change ***  Type = Not Recording   to: Record One
I get 'Error updating recording'.
If I omit the change to Searchtype it triggers a recording but it has the status of 'Recording one +2 later showing' so does not record.
What settings might be wrong?
Phil
Last edited by PhilB on Fri Feb 03, 2023 2:29 pm, edited 1 time in total.
User avatar
bill6502
Developer
Posts: 2299
Joined: Fri Feb 07, 2014 5:28 pm
United States of America

Re: API trigger manual recordings.

Post by bill6502 »

See if this helps: https://pastebin.com/tFQf0ThL
It's a tool that I wrote that was modified for manual
recording rules. See the record_manual_type function.
PhilB
Senior
Posts: 403
Joined: Sun May 11, 2014 6:23 pm
Great Britain

Re: [solved] API trigger manual recordings.

Post by PhilB »

Thanks Bill.
I have solved it this way:
trigger a manual recording from frontend.
Note RecordedId - 1119 in this case
Do a Dvr/GetRecorded?RecordedId=1119 - that returns absolute rubbish! That threw me. BUG??
Wait until it is actually recording:
Do Dvr/GetRecorded?RecordedId=1119 again - now it returns sensible values.
Plant those values in the program and use for calls to Dvr/AddrecordSchedule but change CallSign ,Station, ChanId, StartTime and EndTime
Seems to be working now.
Thanks
Phil
Post Reply