Dvdselect readdvd.sh

Aus VDR Wiki
(Unterschied zwischen Versionen)
Wechseln zu: Navigation, Suche
 
(25 dazwischenliegende Versionen von 16 Benutzern werden nicht angezeigt)
Zeile 1: Zeile 1:
#!/bin/sh
+
Skripte vom [[dvdselect-plugin]].
#
+
 
# dvdselect_readdvd.sh - v.0.1
+
{{Box Datei | [[Struktur|$PATH]]/dvdselect_readdvd.sh |
#
+
<pre>
# source: [[dvdselect-plugin]]
+
#!/bin/sh
#
+
#
# This script will by called by the vdr-plugin dvdselect to copy a DVD to
+
# dvdselect_readdvd.sh
# the local drive.
+
#
#
+
# source: dvdselect-plugin
# It gets the following parameters:
+
#
#
+
# This script will by called by the vdr-plugin dvdselect to copy a DVD to
# $1 = directory for dvd's (see plugin configuration menu)
+
# the local drive.
# $2 = name of dvd
+
#
# $3 = original dvd-device
+
# It gets the following parameters:
 +
#
 +
# $1 = directory for dvd's (see plugin configuration menu)
 +
# $2 = name of dvd
 +
# $3 = original dvd-device
 
   
 
   
rm -f $1/$2.iso
+
rm -f "$1/$2.iso"
 +
mkdir -p "$1/"
 
   
 
   
echo "echo dd if=$3 of=$1/$2.iso" | at now
+
echo "dd if=$3 of=\"$1/$2.iso\" > /var/log/vdr/readdvd.log 2>&1" | at now
 +
</pre>
 +
}}
  
#!/bin/sh
+
{{Box Datei | [[Struktur|$PATH]]/dvdselect_readdvd.sh |
#
+
<pre>
# dvdselect_readdvd.sh - v.0.1.linVDR
+
#!/bin/sh
#
+
#
# source: dvdselect-plugin
+
# dvdselect_readdvd.sh
#
+
#
# an LinVDR angepasst, da LinVDR kein at-Kommando hat
+
# source: dvdselect-plugin
# modified for LinVDR, because there is no at-command
+
#
#  
+
# an LinVDR angepasst, da LinVDR kein at-Kommando hat
# This script will by called by the vdr-plugin dvdselect to copy a DVD to
+
# modified for LinVDR, because there is no at-command
# the local drive.
+
#  
#
+
# This script will by called by the vdr-plugin dvdselect to copy a DVD to
# It gets the following parameters:
+
# the local drive.
#
+
#
# $1 = directory for dvd's (see plugin configuration menu)
+
# It gets the following parameters:
# $2 = name of dvd
+
#
# $3 = original dvd-device
+
# $1 = directory for dvd's (see plugin configuration menu)
 +
# $2 = name of dvd
 +
# $3 = original dvd-device
 
   
 
   
rm -f $1/$2.iso  
+
rm -f "$1/$2.iso"
 +
mkdir -p "$1/"
 
   
 
   
echo " \
+
echo " \
svdrpsend.pl -d localhost "MESG DVD einlesen gestartet" 2>/dev/null 1>/dev/null ; \
+
svdrpsend.pl -d localhost "MESG DVD einlesen gestartet" 2>/dev/null 1>/dev/null ; \
dd if=$3 of=$1/$2.iso ; \
+
dd if=$3 of=\"$1/$2.iso\" ; \
svdrpsend.pl -d localhost "MESG DVD $2 fertig" 2>/dev/null 1>/dev/null ; \
+
svdrpsend.pl -d localhost "MESG DVD $2 fertig" 2>/dev/null 1>/dev/null ; \
" > /tmp/dvdselect_read-temp.sh  
+
" > /tmp/dvdselect_read-temp.sh  
 
   
 
   
chmod 700 /tmp/dvdselect_read-temp.sh
+
chmod 700 /tmp/dvdselect_read-temp.sh
/tmp/dvdselect_read-temp.sh &
+
/tmp/dvdselect_read-temp.sh &
 +
</pre>
 +
}}
 +
 
 +
 
 +
{{Box Datei | [[Struktur|$PATH]]/dvdselect_readdvd.sh |
 +
<pre>
 +
#!/bin/sh
 +
#
 +
# dvdselect_readdvd.sh
 +
#
 +
# This script will by called by the vdr-plugin dvdselect to copy a DVD to
 +
# the local drive, via readcd from packed cdrecord
 +
#
 +
# $1 outdir
 +
# $2 name  (if call with "neue_DVD" default german title, name replaced with name of dvd volume)
 +
# $3 device
 +
{
 +
 
 +
# ATAPI LW des Brenner
 +
BRENNER="$3"
 +
 
 +
if ! test -d "$1"; then
 +
      echo "Verzeichnis $1 nicht gefunden"
 +
      exit 1
 +
fi
 +
 
 +
if test "$2" == "" -o "$2" == "neue_DVD" ; then
 +
    VOLUME=`volname $BRENNER | tr -d " "`
 +
    if test "$VOLUME" == "" ; then
 +
        if test "$2" == "" ; then
 +
            VOLUME="neue_DVD"
 +
        else
 +
            VOLUME="$2"
 +
        fi
 +
    fi
 +
else
 +
    VOLUME="$2"
 +
fi
 +
 
 +
 
 +
IMAGE="$1/$VOLUME.iso"
 +
 
 +
NC="/bin/nc 127.0.0.1 2001"
 +
AT="/usr/bin/at -q t now"
 +
WRAPPER=$(basename $0)
 +
SHOW=$(echo $(basename "$IMAGE") | cut -b -30)
 +
 
 +
echo \
 +
"echo -e \"MESG Starte $WRAPPER : $SHOW.. \nQUIT\" | $NC &>/dev/null;\
 +
readcd -s dev=ATAPI:$BRENNER f='$IMAGE' 1>/dev/null 2>/tmp/$VOLUME.log ;\
 +
eject $3 >/dev/null;\
 +
echo -e \"MESG $WRAPPER fertig : $SHOW.. , in \$((\$(date +%s) - $(date +%s))) Sek.\nQUIT\" | $NC &> /dev/null;\
 +
echo -e \\\a >/dev/tty0" | $AT
  
 +
} 2>&1
 +
</pre>
 +
}}
  
[[Kategorie:Scripts]]
+
[[Kategorie:Skripte]]
 +
{{i18n|Dvdselect readdvd.sh}}

Aktuelle Version vom 2. Dezember 2013, 16:42 Uhr

Skripte vom dvdselect-plugin.

Datei
$PATH/dvdselect_readdvd.sh
#!/bin/sh
#
# dvdselect_readdvd.sh
#
# source: dvdselect-plugin
#
# This script will by called by the vdr-plugin dvdselect to copy a DVD to
# the local drive.
#
# It gets the following parameters:
#
# $1 = directory for dvd's (see plugin configuration menu)
# $2 = name of dvd
# $3 = original dvd-device
 
rm -f "$1/$2.iso"
mkdir -p "$1/"
 
echo "dd if=$3 of=\"$1/$2.iso\" > /var/log/vdr/readdvd.log 2>&1" | at now


Datei
$PATH/dvdselect_readdvd.sh
#!/bin/sh
#
# dvdselect_readdvd.sh
#
# source: dvdselect-plugin
#
# an LinVDR angepasst, da LinVDR kein at-Kommando hat
# modified for LinVDR, because there is no at-command
# 
# This script will by called by the vdr-plugin dvdselect to copy a DVD to
# the local drive.
#
# It gets the following parameters:
#
# $1 = directory for dvd's (see plugin configuration menu)
# $2 = name of dvd
# $3 = original dvd-device
 
rm -f "$1/$2.iso"
mkdir -p "$1/"
 
echo " \
svdrpsend.pl -d localhost "MESG DVD einlesen gestartet" 2>/dev/null 1>/dev/null ; \
dd if=$3 of=\"$1/$2.iso\" ; \
svdrpsend.pl -d localhost "MESG DVD $2 fertig" 2>/dev/null 1>/dev/null ; \
" > /tmp/dvdselect_read-temp.sh 
 
chmod 700 /tmp/dvdselect_read-temp.sh
/tmp/dvdselect_read-temp.sh &



Datei
$PATH/dvdselect_readdvd.sh
#!/bin/sh
#
# dvdselect_readdvd.sh
#
# This script will by called by the vdr-plugin dvdselect to copy a DVD to
# the local drive, via readcd from packed cdrecord
#
# $1 outdir
# $2 name  (if call with "neue_DVD" default german title, name replaced with name of dvd volume)
# $3 device
{

# ATAPI LW des Brenner
BRENNER="$3"

if ! test -d "$1"; then
      echo "Verzeichnis $1 nicht gefunden"
      exit 1
fi

if test "$2" == "" -o "$2" == "neue_DVD" ; then
    VOLUME=`volname $BRENNER | tr -d " "`
    if test "$VOLUME" == "" ; then
        if test "$2" == "" ; then
            VOLUME="neue_DVD"
        else
            VOLUME="$2"
        fi
    fi
else
    VOLUME="$2"
fi


IMAGE="$1/$VOLUME.iso"

NC="/bin/nc 127.0.0.1 2001"
AT="/usr/bin/at -q t now"
WRAPPER=$(basename $0)
SHOW=$(echo $(basename "$IMAGE") | cut -b -30)

echo \
"echo -e \"MESG Starte $WRAPPER : $SHOW.. \nQUIT\" | $NC &>/dev/null;\
readcd -s dev=ATAPI:$BRENNER f='$IMAGE' 1>/dev/null 2>/tmp/$VOLUME.log ;\
eject $3 >/dev/null;\
echo -e \"MESG $WRAPPER fertig : $SHOW.. , in \$((\$(date +%s) - $(date +%s))) Sek.\nQUIT\" | $NC &> /dev/null;\
echo -e \\\a >/dev/tty0" | $AT

} 2>&1
In anderen Sprachen