<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, 28 Mar 2020 at 20:41, Bill Meek <<a href="mailto:keemllib@gmail.com">keemllib@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On 3/28/20 2:27 PM, Klaas de Waal wrote:<br>
>    File "./mythtv-record.py", line 1479, in delete_recordingid<br>
>      resp_dict = backend.send(endpoint=endpoint, rest=rest, opts=opts)<br>
<br>
Need to use postdata rather than rest, for example:<br>
<br>
     postdata = {<br>
         'RecordedId': recordedid,<br>
         'ForceDelete': 'True',<br>
         'AllowRerecord': 'True'<br>
     }<br>
<br>
     resp_dict = backend.send(endpoint=endpoint, postdata=postdata, opts=opts)<br>
<br><br></blockquote><div>Yes this does work and it can actually delete a recording in progress.</div><div>Problem is that it requires a recordedid but when I start the recording I get a recordid.</div><div>As shown by the following:</div><div><br></div><div>[klaas@modu MythTVPython]$ ./mythtv-record.py add --chanid 170858 --manual --starttime 2020-03-29T16:15:00 --type Single --title test2 --duration=60<br>-1: 170858 NPO 1 Single Record test2 Start:2020-03-29T14:15:00Z  End:2020-03-29T15:15:00Z  Priority:0      Inactive:false  Profile:Default RecGroup:Default PlayGroup:Default LastRecorded:      Expire:true <br><br>Added: "test2" (RecordId 3796).<br></div><div><br></div><div>MariaDB [mythconverg]> select chanid,title,recordid,recordedid from recorded where recordid=3796;<br>+--------+-------+----------+------------+<br>| chanid | title | recordid | recordedid |<br>+--------+-------+----------+------------+<br>| 120081 | test2 |     3796 |       8896 |<br>+--------+-------+----------+------------+</div><div><br></div><div>[klaas@modu MythTVPython]$ ./mythtv-record.py delete --recordid 8896<br>RecordingId "8896" has been deleted.<br></div><div><br></div><div>My understanding is that the entry in table record is created when the recording is scheduled with the "mythtv-record.py add" command. This makes it possible to return the recordid.<br></div><div>The entry in table recorded is created when the recording is started, which is usually later in time, so the "myth-record.py add" command cannot know this.</div><div>So it looks that what I need is the incantation to delete a recording by recordid.</div><div>Or a sql query to get the recordedid but that is not really how the ServicesAPI should work afaik.</div><div><br></div><div>Thanks,</div><div>Klaas.<br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div></div></div>