diff options
author | Michael Hanson <mihanson@linhes.org> | 2012-04-14 05:13:05 (GMT) |
---|---|---|
committer | Michael Hanson <mihanson@linhes.org> | 2012-04-14 05:13:05 (GMT) |
commit | 5e96cb93d1f17a98a8f8a118b2659ea4d71d3f43 (patch) | |
tree | acde2ddc972337f648a826f3d961dcb8bebf892a /abs/core/LinHES-system/myth_status.py | |
parent | 8e721470713e6a5a164f1d7682b0d248cb87b03c (diff) | |
parent | 502a19b42d9df3fb3c3e521a37eebd20f9fbd984 (diff) | |
download | linhes_pkgbuild-5e96cb93d1f17a98a8f8a118b2659ea4d71d3f43.zip linhes_pkgbuild-5e96cb93d1f17a98a8f8a118b2659ea4d71d3f43.tar.gz linhes_pkgbuild-5e96cb93d1f17a98a8f8a118b2659ea4d71d3f43.tar.bz2 |
Merge branch 'testing' of linhes.org:linhes_pkgbuild into testing
Conflicts:
abs/extra/bluez/PKGBUILD
abs/extra/bluez/__changelog
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 "" |