Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/env python
- #
- # Prints various details about recordings. The Storage Group
- # is hardcoded to "Default"!
- #
- headingPrinted = False
- import argparse, sys
- from MythTV import MythBE, Recorded
- try:
- be = MythBE()
- except:
- print 'Is mythbackend running?'
- sys.exit(1)
- recs = Recorded.getAllEntries()
- sortedRecordings = sorted(recs, key = lambda recs: (recs.title, recs.starttime))
- for recording in sortedRecordings:
- if recording.recgroup != 'LiveTV' and \
- recording.recgroup != 'Deleted':
- if headingPrinted == False:
- print '\nRecordings:\n'
- print ' {0:<17.17} {1:<30.30}\t{2:<10.10} {3}' \
- .format('Start Time', 'Title', 'Subtitle', 'File')
- headingPrinted = True
- print ' {0:} {1:<30.30}\t{2:<10.10} {3}' \
- .format(recording.starttime.strftime("%b %d %Y %H:%M"),
- recording.title.encode('utf-8'),
- recording.subtitle.encode('utf-8'),
- be.fileExists(recording.basename, 'Default'))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement