diff options
Diffstat (limited to 'abs/core/LinHES-system/myth_status.py')
-rw-r--r-- | abs/core/LinHES-system/myth_status.py | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/abs/core/LinHES-system/myth_status.py b/abs/core/LinHES-system/myth_status.py index 4e44fd5..53d64d9 100644 --- a/abs/core/LinHES-system/myth_status.py +++ b/abs/core/LinHES-system/myth_status.py @@ -1,6 +1,6 @@ #!/usr/bin/python2 from MythTV import MythBE,MythDB,MythLog -import datetime,time,sys +import datetime,time,sys,subprocess try: be=MythBE() db = MythDB() @@ -12,6 +12,7 @@ cursor = db.cursor() now = datetime.datetime.now() farout=99999999 next_start_diff=datetime.timedelta(farout) +num_upcoming=12 def formatTD(td): #print td @@ -68,10 +69,15 @@ for i in a: print "" -print "Upcoming Recordings:" +print "Upcoming Recordings (Next %s scheduled):" %(num_upcoming) print "--------------------" a=be.getUpcomingRecordings() +r=0 for i in a: + r += 1 + if r > num_upcoming: + break + title_chan="%s (%s)" %(i.title, i.channame) print " %s - %s - %-50s " %(i.starttime,i.hostname, title_chan) #start_time=time.strptime(str(i.starttime), "%Y-%m-%d %H:%M:%S") @@ -101,5 +107,5 @@ else: ur=formatTD(next_start_diff) print "The next recording starts in:\n %s" %(ur) print "" - - +subprocess.call("/usr/LH/bin/diskspace.sh",shell=True) +print "" |