summaryrefslogtreecommitdiffstats
path: root/abs/core/LinHES-system/ripD_eject.sh
diff options
context:
space:
mode:
authorBritney Fransen <brfransen@gmail.com>2013-09-17 21:19:13 (GMT)
committerBritney Fransen <brfransen@gmail.com>2013-09-17 21:19:13 (GMT)
commit649f466d6496c9f8fe965215980c756d76b36eb3 (patch)
treecb9d49597a447047d90ad2905c61ad4f9e63139f /abs/core/LinHES-system/ripD_eject.sh
parent8237da7b67ce46abac536bc53e3e39e7d49eb669 (diff)
downloadlinhes_pkgbuild-649f466d6496c9f8fe965215980c756d76b36eb3.zip
linhes_pkgbuild-649f466d6496c9f8fe965215980c756d76b36eb3.tar.gz
linhes_pkgbuild-649f466d6496c9f8fe965215980c756d76b36eb3.tar.bz2
LinHES-system: convert ripD_eject.sh and importfiles.sh to use msg_client.py for OSD.
Diffstat (limited to 'abs/core/LinHES-system/ripD_eject.sh')
-rwxr-xr-xabs/core/LinHES-system/ripD_eject.sh33
1 files changed, 13 insertions, 20 deletions
diff --git a/abs/core/LinHES-system/ripD_eject.sh b/abs/core/LinHES-system/ripD_eject.sh
index 99947a8..715d0dd 100755
--- a/abs/core/LinHES-system/ripD_eject.sh
+++ b/abs/core/LinHES-system/ripD_eject.sh
@@ -12,37 +12,30 @@ LOG='/var/log/mythtv/ripD.log' # name of Log file.
TRACK=$(lsdvd | grep -i longest | awk '{print $3}') #Finds longest track
FILE=$TITLE
#-----------------------------------------------------------------------
-FONT="-adobe-helvetica-bold-*-*-*-34-*-*-*-*-*-*-*"
-OPTS="-f $FONT -s 2 -p bottom -A left -i 50 -l 4"
-#-----------------------------------------------------------------------
[ -r /etc/rip.cfg ] && . /etc/rip.cfg
#-----------------------------------------------------------------------
LOCK=/tmp/.ripLock.$$
[ "$DISPLAY" == "" ] && export DISPLAY=:0
########################################################################
-function osd { # $1=text, $2=color, $3=delay
- cmd="osd_cat $OPTS"
- [ -n "$2" ] && cmd="$cmd --color=$2"
- [ -n "$3" ] && cmd="$cmd -d $3"
- killall osd_cat
- echo -e "$1" | $cmd
+function osd { # $1=text, $2=delay
+ msg_client.py --kill
+ msg_client.py --msg "$1" --timeout $2
} >& /dev/null
function osd_loop() {
FN=$1 ; shift
-# TXT="$MAX to $dir"
- TXT="$MAX to $dir/$FILE"
+ TXT="to $dir/$FILE"
N=0
while [ -f "$LOCK" ]; do
- #osd "\nbacking up DVD: '$@'\n$TXT" gray 60
- osd "\nbacking up DVD: '$TITLE'\n$TXT" gray 60
- N=$(($N+1))
- [ -d "$FN" ] && SIZE=$(du -sh $FN | awk '{print $1}')
+ osd "Backing up '$TITLE' $TXT" 70
+ N=$(($N+1))
+# [ -d "$FN" ] && SIZE=$(du -sh $FN | awk '{print $1}')
# TXT="$SIZE of $MAX @ $N min. elapsed"
- TXT="$N min. elapsed"
+ TXT="($N min. elapsed)"
+ sleep 60
done
}
########################################################################
-LinHES-osd "\nDetecting DVD" gray20 5 &
+osd "Detecting DVD..." 60 &
echo "`date` detected DVD" >> $LOG
rm -f /tmp/.ripLock.*
#=======================================================================
@@ -54,13 +47,13 @@ done
#-----------------------------------------------------------------------
if [ ! -d "$dir" ]; then
echo "no $dir" >> $LOG
- osd "\ndirectory: $dir\nnot found!" red 10 &
+ osd "$dir Not Found!" 10 &
eject ; eject
exit 0
fi
if [ ! -w "$dir" ]; then
echo "$dir not writable" >> $LOG
- osd "\ndirectory: $Cdir\nnot writable!" red 10 &
+ osd "$dir Not Writable!" 10 &
eject ; eject
exit 0
fi
@@ -113,7 +106,7 @@ fi
$COMMAND
# Finish:
rm -f $LOCK
- osd "\nfinish DVD: '$TITLE'\ninto $dir/$FILE" gray20 5 &
+ osd "Done Backing up '$TITLE' to $dir/$FILE" 5 &
sleep 1 ; aplay $Esnd
# Eject the media:
sudo eject ; sudo eject