[mythtv] Stop a recording via CLI or API

David Schlenk david at schdav.org
Wed May 11 04:10:26 UTC 2016


I'm trying to write a little script that stops recording MLB games that get
postponed and extend the recording time for games that go long. Yes, I know
MRE exists but it looks abandoned and I like a challenge. Anyway, extending
seems easy enough - update the recording rule by adding to EndOffset, maybe
kick the backend with 'mythutil --resched' (or maybe using the Dvr services
API makes that unnecessary?), but if I want to stop a recording, not sure
how to handle that.

The data in the encoder list from GetEncoderList includes both EndTime and
EndTs, for the scheduled end time and the offset-applied end time
respectively, but the data from GetRecordSchedule only has the scheduled
end time and the offset as a number. I tried changing the offset by calling
UpdateRecordSchedule, and it does change it in the rule, but it doesn't
apply to any current recordings, even if I kick the scheduler with
mythutil. Do I have to do something silly like call DeleteRecording
followed immediately with UnDeleteRecording? The API notes mentioned
something about asking for an override rule when I call GetRecordSchedule,
which I do, but I'm not sure how to indicate in the UpdateRecordSchedule
payload that I'm sending an override rule? Is that what the undocumented
Type field is for? That's the only field I could find in the schema that
wasn't accounted for somehow in the payload of GetRecordSchedule.

Any help appreciated. Thanks!

David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mythtv.org/pipermail/mythtv-dev/attachments/20160510/a2573013/attachment.html>


More information about the mythtv-dev mailing list