[mythtv-users] Deleting recordings using python bindings

Stephen Robertson stephengrobertson at gmail.com
Sat Nov 17 22:55:48 UTC 2012


I've been having issues using the additonal lossless cut feature to
delete recordings after processing.  However it appears clear that my
problems are not related to lossless cut hence the new thread.

I went back to some steps Doug suggested earlier and tried them with
my now more up to date install.

Any suggestions what could be wrong?
Thanks
Stephen

MythTV Version : v0.26.0-35-g81e8fa5
MythTV Branch : fixes/0.26
Network Protocol : 75
Library API : 0.26.20120822-1
QT Version : 4.8.1

Trying these test commands:

Python 2.7.3 (default, Aug  1 2012, 05:16:07)
[GCC 4.6.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from MythTV import MythDB, MythBE, Recorded
>>> db = MythDB()
>>> be = MythBE(backend=db.gethostname(), db=db)
>>> recorded_list = list(db.searchRecorded(basename="8941_20121112202800.mpg"))
>>> recorded_list
[<Recorded 'Panorama','2012-11-12 21:28:00+01:00' at 0xa0bee3c>]
>>> recorded = recorded_list[0]
>>> recorded
<Recorded 'Panorama','2012-11-12 21:28:00+01:00' at 0xa0bee3c>
>>> program = be.getRecording(chanid=recorded.chanid,starttime=recorded.starttime)
>>> program
<Program 'Panorama','2012-11-12 21:30:00+01:00' at 0xa0c2dac>
>>>result = be.deleteRecording(program, force=True)
>>> print 'The result should = "-1" which means success. Re sult(%s)' % result
The result should = "-1" which means success. Result(-1)
>>>

Results in this in the backend log:

Nov 17 20:23:33 bressay  mythbackend[2612]: E DeleteThread
mainserver.cpp:1954 (DoDeleteThread) ERROR retrieving program info
when trying to delete program for chanid 8941 recorded at
2012-11-12T21:28:00Z. Recording will NOT be deleted.


More information about the mythtv-users mailing list