diff options
Diffstat (limited to 'abs/core/LinHES-system')
-rwxr-xr-x | abs/core/LinHES-system/LinHES-session | 4 | ||||
-rwxr-xr-x | abs/core/LinHES-system/PKGBUILD | 10 | ||||
-rw-r--r-- | abs/core/LinHES-system/myth_status.py | 76 | ||||
-rw-r--r-- | abs/core/LinHES-system/myth_status.sh | 3 |
4 files changed, 85 insertions, 8 deletions
diff --git a/abs/core/LinHES-system/LinHES-session b/abs/core/LinHES-system/LinHES-session index f33ebeb..39a60b0 100755 --- a/abs/core/LinHES-system/LinHES-session +++ b/abs/core/LinHES-system/LinHES-session @@ -48,10 +48,6 @@ export MALLOC_CHECK_=0 function msg(){ echo -e "$1" | osd_cat --pos=middle --align=center --offset=200 --delay=5 --color=$color --outline=$outline --outlinecolour=$outlinecolour --shadow=$shadow --shadowcolour=$shadowcolour --font=$font & - #use fancy ghost - #bash -c "sleep 6;osdClient.pl localhost 5000 'ALT+h for shortcuts:::SYS' "& - - } diff --git a/abs/core/LinHES-system/PKGBUILD b/abs/core/LinHES-system/PKGBUILD index 2b0f2a7..df31953 100755 --- a/abs/core/LinHES-system/PKGBUILD +++ b/abs/core/LinHES-system/PKGBUILD @@ -1,14 +1,14 @@ pkgname=LinHES-system pkgver=2 -pkgrel=9 +pkgrel=11 arch=('i686') MVDIR=$startdir/pkg/usr/LH BINDIR=$startdir/pkg/usr/bin install=LinHES.install pkgdesc="scripts and things related to having an automated system" -depends=(linhes-sounds xdotool fluxbox tilda keylaunch ) +depends=(linhes-sounds xdotool fluxbox tilda keylaunch python_aosd) backup=(etc/modprobe.d/alsa-base) -binfiles="LinHES-start optimize_mythdb.py myth_mtc.py myth_mtc.sh LinHES-run firstboot.sh load-modules-mythvantage.sh unclutter-toggle.sh tvterm.sh myth_mtc.lr smolt.cron mythfrontend-start set_windowmanager.sh" +binfiles="LinHES-start optimize_mythdb.py myth_mtc.py myth_mtc.sh LinHES-run firstboot.sh load-modules-mythvantage.sh unclutter-toggle.sh tvterm.sh myth_mtc.lr smolt.cron mythfrontend-start set_windowmanager.sh myth_status.py myth_status.sh" source=(LinHES-session LinHES-profile.sh $binfiles alsa-base) @@ -37,7 +37,7 @@ build() { mkdir $startdir/pkg/etc/logrotate.d cp $startdir/myth_mtc.lr $startdir/pkg/etc/logrotate.d } -md5sums=('6ecd5876ce62a7c17af64c0b852b3523' +md5sums=('2836a90e5d191faae80fad37025a5c9b' '5881bdb43d578ec3a79d1f77ea58a3db' 'a875ee97f86e46f34a741c2bc455f894' '76b2637cac0452b3acdbeeb4e8a5474b' @@ -52,4 +52,6 @@ md5sums=('6ecd5876ce62a7c17af64c0b852b3523' 'abe887472a170bd1a8e6da6a7b7e93e4' '752488eb8bfb672ce0e4c924f7faf3d1' 'dae4dfb638b11c8c79fb1424a60b762a' + '361bf81a6a117d61c3bc32dda91c4cb9' + 'ce72aad1fc66c575f863d4bfbf65ce16' 'eb879fee9603a05d5420d4ce8ed9e450') diff --git a/abs/core/LinHES-system/myth_status.py b/abs/core/LinHES-system/myth_status.py new file mode 100644 index 0000000..ce95c3e --- /dev/null +++ b/abs/core/LinHES-system/myth_status.py @@ -0,0 +1,76 @@ +#!/usr/bin/python2 +from MythTV import MythBE,MythDB,MythLog +import datetime,time,sys +try: + be=MythBE() + db = MythDB() +except: + print "Couldn't connect to MythTV service for status" + sys.exit(1) + +cursor = db.cursor() +now = datetime.datetime.now() +next_start_diff=0 + +def formatTD(td): + hours = td.seconds // 3600 + minutes = (td.seconds % 3600) // 60 + seconds = td.seconds % 60 + return '%s hours, %s minutes, %s seconds' % (hours, minutes, seconds) + + + +a=be.getRecorderList() +header="#"*60 +print header +print "\n" +print "Tuner Status: " +print "--------------" +for i in a: + cmd="select cardtype,hostname from capturecard where cardid=%s;" %i + + cursor.execute(cmd) + results=cursor.fetchall() + type = results[0][0] + hostname = results[0][1] + id = i + c=be.getCurrentRecording(i) + if c.title == None: + current_recording = "Idle" + else: + current_recording = "Recording %s" %c.title + print " Tuner %s (%s) on %s : %s " %(id, type, hostname, current_recording) + +print "" +print "Upcoming Recordings:" +print "--------------------" +a=be.getUpcomingRecordings() +for i in a: + 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") + + diff = i.starttime - now +# print diff.seconds + if diff.seconds < next_start_diff or next_start_diff == 0: + next_start_diff = diff.seconds + +print " " +print "Conflicted Recordings:" +print "----------------------" +a=be.getConflictedRecordings() +for i in a: + title_chan="%s (%s)" %(i.title, i.channame) + print " %s - %-50s " %(i.starttime,title_chan) + +print "" +print "" +if next_start_diff == 0: + ur="No recordings are scheduled" +else: + d=(datetime.timedelta(seconds=next_start_diff)) + ur=formatTD(d) +print "The next recording starts in:\n %s" %(ur) + + + diff --git a/abs/core/LinHES-system/myth_status.sh b/abs/core/LinHES-system/myth_status.sh new file mode 100644 index 0000000..bc986ec --- /dev/null +++ b/abs/core/LinHES-system/myth_status.sh @@ -0,0 +1,3 @@ +#!/bin/bash +MYTHCONFDIR=/usr/share/mythtv /usr/LH/bin/myth_status.py + |