[mythtv-users] list my "damaged" recordings
Bill Meek
keemllib at gmail.com
Mon Oct 26 14:52:39 UTC 2015
On 10/26/2015 01:05 AM, Evuraan wrote:
> how can i list my damaged recordings (so I can programmatically delete those..)?
>
> I want to list my yellow text recordings with questionable
> "RecordingQuality overall_score" by querying mythconverg - cannot seem
> to figure out which table holds this info. figured I'd ask at this
> time!
>
> any help will be much appreciated!
Hi,
Try this for starters, then you can use the Python bindings
to remove as required. See also:
https://www.mythtv.org/wiki/0.25_Python_Bindings/Connection_Handlers#MythBE
#!/usr/bin/env python
#
# Print info for recordings marked as damaged.
#
from MythTV import MythDB
import sys
try:
db = MythDB()
except:
print 'Unable to connect to the MythTV database, aborting.'
sys.exit(1)
headingNotPrinted = True
for recording in db.searchRecorded():
pgm = recording.getRecordedProgram()
if not 'DAMAGED' in pgm.videoprop:
continue
if headingNotPrinted:
headingNotPrinted = False
print '\n {0:40.40} {1:17} {2}'.format(
'Title','Starttime','Video Properites')
print ' {0:40.40} {1} {2}'.format(
pgm.title,
pgm.starttime.strftime("%b %d %Y %H:%M"),
pgm.videoprop)
--
Bill
More information about the mythtv-users
mailing list