aboutsummaryrefslogtreecommitdiff
blob: 8ed0e9c68c3948016c23d18878192a0c5d6c2c82 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/bin/bash
#
# 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

include svdrpcmd
svdrp_command

if [[ -z ${EXECUTED_BY_VDR_BG} ]]; then
	VDR_BG=/usr/share/vdr/bin/vdr-bg.sh
	[[ -e ${VDR_BG} ]] || VDR_BG=/usr/lib/vdr/bin/vdr-bg.sh

	exec "${VDR_BG}" "${0}" "${@}"
	exit
fi

rm -f "$1/$2"

"${SVDRPCMD}" -d localhost "MESG DVD einlesen gestartet"
dd if="$3" of="$1/$2"
"${SVDRPCMD}" -d localhost "MESG DVD $2 fertig"