[mythtv-users] press a key to continue watching this channel
David Engel
david at istwok.net
Wed Feb 9 20:33:24 UTC 2011
On Wed, Feb 09, 2011 at 02:37:01PM -0500, Michael T. Dean wrote:
> http://www.gossamer-threads.com/lists/mythtv/dev/444495#444495
>
> Easy to miss since it's on the other list, so we'd very much
> appreciate your summarizing the solution on the wiki (and/or here).
> :)
I missed the beginning of this new thread or I would have jumped in
earlier. To follow up from the old thread, I've been using the
attached channel change script for 6 months now without any problems
except for the STB's info OSD being briefly visible every 135 minutes.
There are a couple of things worth noting about the script. First, I
have is symlinked as stchan0 and stbchan1 to control two STBs. The
script name as invoked is used to determin which STB to control.
Second, the backgrounding is only done when invoked by the mythtv user
so I don't have to worry about permissions on the PID files.
I'll try to put this on the wiki when I get a chance, but if someone
else wants to do sooner, go right ahead.
David
--
David Engel
david at istwok.net
-------------- next part --------------
#!/bin/bash
case $0 in
*1) GUID=0x0023a3fffe1ca585 ;;
*) GUID=0x0012c9fffe3aac02 ;;
esac
#echo "$0: GUID=$GUID"
NODE=$(plugreport | grep $GUID | cut -d' ' -f2)
#echo "$0: NODE=$NODE"
if [ -z "$NODE" ]; then
echo "$0: can't determine NODE"
exit 1
fi
if [ $(id -u -n) = "mythtv" ]; then
PIDFILE=/tmp/$(basename $0).pid
#echo "$0: PIDFILE=$PIDFILE"
if [ -e $PIDFILE ]; then
OLDPID=$(<$PIDFILE)
#echo "$0: OLDPID=$OLDPID"
pkill -P $OLDPID
fi
SLEEP=9900
#echo "$0: SLEEP=$SLEEP"
(
while sleep $SLEEP; do
stb-command -n$NODE display_info || break
stb-command -n$NODE exit || break
done
) &
NEWPID=$!
#echo "$0: NEWPID=$NEWPID"
echo $NEWPID >$PIDFILE
fi
6200ch -n$NODE ${1+"$@"}
More information about the mythtv-users
mailing list