<div><div>Hi Doug,</div><div><br></div><div>Sure enough those steps do not work.  Here is the python output and a couple of lines from the backend log.</div><div><br></div><div>Cheers</div><div>Stephen</div><div><br></div>
<div>&gt;&gt;&gt; recorded_list = list(db.searchRecorded(basename=&quot;8940_20121109002000.mpg&quot;))&gt;&gt;&gt; recorded_list</div><div>[&lt;Recorded &#39;A Little Later&#39;,&#39;2012-11-09 01:20:00+01:00&#39; at 0xa095e3c&gt;]</div>
<div>&gt;&gt;&gt; recorded = recorded_list[0]</div><div>&gt;&gt;&gt; recorded</div><div>&lt;Recorded &#39;A Little Later&#39;,&#39;2012-11-09 01:20:00+01:00&#39; at 0xa095e3c&gt;</div><div>&gt;&gt;&gt; program = be.getRecording(chanid=recorded.chanid,starttime=recorded.starttime)</div>
<div>&gt;&gt;&gt; program</div><div>&lt;Program &#39;A Little Later&#39;,&#39;2012-11-09 01:20:00+01:00&#39; at 0xa099dac&gt;</div><div>&gt;&gt;&gt; result = be.deleteRecording(program, force=True)</div><div>&gt;&gt;&gt; print &#39;The result should = &quot;-1&quot; which means success. Result(%s)&#39; % result</div>
<div>&gt;&gt;&gt; recorded_list = list(db.searchRecorded(basename=&quot;8940_20121109002000.mpg&quot;))&gt;&gt;&gt; recorded_list<br></div><div>[&lt;Recorded &#39;A Little Later&#39;,&#39;2012-11-09 01:20:00+01:00&#39; at 0xa099e3c&gt;]</div>
<div>&gt;&gt;&gt; print &#39;The recorded_list should be empty if deletion worked. Recorded_list: &quot;%s&quot;&#39; % recorded_list</div><div>The recorded_list should be empty if deletion worked. Recorded_list: &quot;[&lt;Recorded &#39;A Little Later&#39;,&#39;2012-11-09 01:20:00+01:00&#39; at 0xa099e3c&gt;]&quot;</div>
<div>&gt;&gt;&gt; </div></div><div><br></div><div><br></div><div><br></div><div>Nov  9 20:19:34 bressay  mythbackend[2665]: I Scheduler scheduler.cpp:2126 (HandleReschedule) Reschedule requested for CHECK 0 985 0 DoHandleDelete3 | A Little Later | Jazz | Musical highlights from Later with Jools Holland, featuring performances by Stan Tracey, the Hypnotic Brass Ensemble and Diana Krall. | </div>
<div><br></div><div>Nov  9 20:19:37 bressay  mythbackend[2665]: E DeleteThread mainserver.cpp:1954 (DoDeleteThread) ERROR retrieving program info when trying to delete program for chanid 8940 recorded at 2012-11-09T01:20:00Z. Recording will NOT be deleted.</div>
<div>Nov  9 20:19:39 bressay  mythbackend[2665]: I Scheduler scheduler.cpp:2239 (HandleReschedule) Scheduled 255 items in 5.5 = 0.00 match + 0.00 check + 5.50 place</div><div class="gmail_extra"><br><br><div class="gmail_quote">
On Fri, Nov 9, 2012 at 4:09 PM, Doug Vaughan <span dir="ltr">&lt;<a href="mailto:r.d.vaughan@rogers.com" target="_blank">r.d.vaughan@rogers.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Stephen,<br>
    During testing I saw something odd with this functionality but after a discussion with the dev who supports the python bindings, put it down to bad test data as I get that data from different MythTV versions. Here is a test I would like you to try. This functionality works under MythTV v0.25 as I use it all the time. You made a great suggestion:)<br>

<br>
With your additional comments I think there may be a v0.26 bug in either the backend or the bindings. The data times never come into play as I only use the python bindings to do the deletionand the bindings just tell the backend to delete the recording.<br>

<br>
Here is what I would like you to try as you have a clean MythTV v0.26 environment. First find a recording you no longer care about and copy to the clipboard the file name plus extension. Youdo not want to include the file path. In the lines below replace the string &quot;your_recorded_filename.mpg&quot; with the recording file name you copied to the clipboard. There are two instances of that name. Then copy all of step one and paste into a terminal session.<br>

<br>
Step 1:<br>
<br>
python<br>
from MythTV import MythDB, MythBE, Recorded<br>
db = MythDB()<br>
be = MythBE(backend=db.gethostname(<u></u>), db=db)<br>
recorded_list = list(db.searchRecorded(<u></u>basename=&quot;your_recorded_<u></u>filename.mpg&quot;))<br>
recorded_list<br>
recorded = recorded_list[0]<br>
recorded<br>
program = be.getRecording(chanid=<u></u>recorded.chanid,starttime=<u></u>recorded.starttime)<br>
program<br>
result = be.deleteRecording(program, force=True)<br>
print &#39;The result should = &quot;-1&quot; which means success. Result(%s)&#39; % result<br>
<br>
<br>
Step 2:<br>
Wait a couple of minutes to let the backend do its work then cut and paste the following statements into your terminal session:<br>
<br>
recorded_list = list(db.searchRecorded(<u></u>basename=&quot;your_recorded_<u></u>filename.mpg&quot;))<br>
recorded_list<br>
print &#39;The recorded_list should be empty if deletion worked. Recorded_list: &quot;%s&quot;&#39; % recorded_list<br>
<br>
<br>
Hit ctrl-D to exit the python session. Check the database and the recorded record for that program and recorded video file should be deleted. Also check the backend log to see if there were any error messages about the delete. I thought I saw some logged messages during testingbut disregarded them as they did not occur during a second test.<br>

<br>
<br>
Here is what happens with a MythTV v0.25 successful deletion. This is also what it should look like with v0.26:<br>
&gt; python<br>
Python 2.7.3 (default, Aug 1 2012, 05:14:39)<br>
[GCC 4.6.3] on linux2<br>
Type &quot;help&quot;, &quot;copyright&quot;, &quot;credits&quot; or &quot;license&quot; for more information.<br>
&gt;&gt;&gt; from MythTV import MythDB, MythBE, Recorded<br>
&gt;&gt;&gt; db = MythDB()<br>
&gt;&gt;&gt; be = MythBE(backend=db.gethostname(<u></u>), db=db)<br>
&gt;&gt;&gt; recorded_list = list(db.searchRecorded(<u></u>basename=&quot;2559_20121108170000.<u></u>mpg&quot;))<br>
&gt;&gt;&gt; recorded_list<br>
[&lt;Recorded &#39;Sons of Anarchy&#39;,&#39;2012-11-08 17:00:00&#39; at 0x1cf1890&gt;]<br>
&gt;&gt;&gt; recorded = recorded_list[0]<br>
&gt;&gt;&gt; recorded<br>
&lt;Recorded &#39;Sons of Anarchy&#39;,&#39;2012-11-08 17:00:00&#39; at 0x1cf1890&gt;<br>
&gt;&gt;&gt; program = be.getRecording(chanid=<u></u>recorded.chanid,starttime=<u></u>recorded.starttime)<br>
&gt;&gt;&gt; program<br>
&lt;Program &#39;Sons of Anarchy&#39;,&#39;2012-11-08 17:00:00&#39; at 0x1ce95c0&gt;<br>
&gt;&gt;&gt; result = be.deleteRecording(program, force=True)<br>
&gt;&gt;&gt; print &#39;The result should = &quot;-1&quot; which means success. Result(%s)&#39; % result<br>
The result should = &quot;-1&quot; which means success. Result(-1)<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; recorded_list = list(db.searchRecorded(<u></u>basename=&quot;2559_20121108170000.<u></u>mpg&quot;))<br>
&gt;&gt;&gt; recorded_list<br>
[]<br>
&gt;&gt;&gt; print &#39;The recorded_list should be empty if deletion worked. Recorded_list: &quot;%s&quot;&#39; % recorded_list<br>
The recorded_list should be empty if deletion worked. Recorded_list: &quot;[]&quot;<br>
&gt;&gt;&gt;<br>
<br>
If this does not work for you please tell me and I will talk to the bindings developer and/or create a ticket. If you had any backend error messages please email them in your reply.<br>
<br>
Thanks<br>
<br>
Doug<br>
______________________________<u></u>_________________<br>
mythtv-users mailing list<br>
<a href="mailto:mythtv-users@mythtv.org" target="_blank">mythtv-users@mythtv.org</a><br>
<a href="http://www.mythtv.org/mailman/listinfo/mythtv-users" target="_blank">http://www.mythtv.org/mailman/<u></u>listinfo/mythtv-users</a><br>
</blockquote></div><br></div>