From 54d5f6870a7351584fcb1c3e861a4fc9224badf3 Mon Sep 17 00:00:00 2001 From: Martin Prochnow Date: Sun, 26 Mar 2006 12:18:12 +0200 Subject: Version 0.7 - added frensh translation; thanks to Patrice Staudt - added finnish translation; thanks to Rolf Ahrenberg - several bugfixes: * if there are more then one recording with the same name, only one of it is shown if the recording details are hidden; thanks to Monroe from vdr-portal.de for reporting * recording list entry (not the recording itselfs!) is deleted, if it is moved to the same place; thanks to Monroe from vdr-portal.de for reporting * if a recording was deleted, the selection bar jumps to the first list entry * some people reported problems with wrong recording dates using LinVDR - revised rename-recording-menu; thanks to Monroe from vdr-portal.de for suggesting - revised move-recording-menu - it is now more obvious; thanks to Monroe from vdr-portal.de for suggesting - added option to show an alternative new marker - it's only useful for german speaking users because this icon shows 'NEU'; suggestions for an international version are welcome, you has 22x22 pixels for it - added the functionality of the DvdArchive- and the DVDShowArchive-patch for VDR - thanks fpr vejoun from vdr-portal.de for the script 'dvdarchive.sh' --- scripts/dvdarchive.sh | 49 +++++++++++++++++++++++++++++++++++++++++++++++ scripts/dvdarchive.sh.old | 37 +++++++++++++++++++++++++++++++++++ 2 files changed, 86 insertions(+) create mode 100755 scripts/dvdarchive.sh create mode 100755 scripts/dvdarchive.sh.old (limited to 'scripts') diff --git a/scripts/dvdarchive.sh b/scripts/dvdarchive.sh new file mode 100755 index 0000000..70770ce --- /dev/null +++ b/scripts/dvdarchive.sh @@ -0,0 +1,49 @@ +#!/bin/bash + +MOUNTCMD="/usr/bin/sudo /bin/mount" +UMOUNTCMD="/usr/bin/sudo /bin/umount" +MOUNTPOINT="/media/cdrom" # no trailing '/'! + +PATH="$2" +NAME="$3" + +case "$1" in +mount) + # mount dvd + $MOUNTCMD "$MOUNTPOINT" + if [ $? -eq 0 ] + then + DIR="$(/usr/bin/find "${MOUNTPOINT}/" -name "$NAME")" + # link vdr files + /bin/cp -s "${DIR}/index.vdr" "${PATH}/" + /bin/cp -s "${DIR}/"???.vdr "${PATH}/" + if [ $? -ne 0 ] + then + $UMOUNTCMD "$MOUNTPOINT" + # unlink broken links + for LINK in "${PATH}/"*.vdr; do + if [ -L "$LINK" -a ! -s "$LINK" ]; then + /bin/rm "$LINK" + fi + done + exit 2 + fi + else + exit 1 + fi + ;; +umount) + $MOUNTCMD | /bin/grep "$MOUNTPOINT" > /dev/null + if [ $? -eq 0 ] + then + # umount dvd + $UMOUNTCMD "$MOUNTPOINT" + # unlink broken links + for LINK in "${PATH}/"*.vdr; do + if [ -L "$LINK" -a ! -s "$LINK" ]; then + /bin/rm "$LINK" + fi + done + fi + ;; +esac diff --git a/scripts/dvdarchive.sh.old b/scripts/dvdarchive.sh.old new file mode 100755 index 0000000..ffe1737 --- /dev/null +++ b/scripts/dvdarchive.sh.old @@ -0,0 +1,37 @@ +#!/bin/sh + +#MOUNTCMD="/bin/mount" +MOUNTCMD="/usr/bin/sudo mount" +#UMOUNTCMD="/bin/umount" +UMOUNTCMD="/usr/bin/sudo umount" +MOUNTPOINT="/media/cdrom/" # trailing '/' is important! (for find command) +PATH=$2 +NAME=$3 + +case "$1" in +mount) + # mount dvd + $MOUNTCMD $MOUNTPOINT + if [ $? -eq 0 ] + then + DIR=$(/usr/bin/find $MOUNTPOINT -name $NAME) + # bind recording dir on dvd to recording dir in /video + $MOUNTCMD --bind $DIR $PATH + if [ $? -ne 0 ] + then + $UMOUNTCMD $MOUNTPOINT + exit 2 + fi + else + exit 1 + fi + ;; +umount) + $MOUNTCMD | /bin/grep $PATH > /dev/null + if [ $? -eq 0 ] + then + $UMOUNTCMD $PATH + $UMOUNTCMD $MOUNTPOINT + fi + ;; +esac -- cgit v1.2.3