summaryrefslogtreecommitdiff
path: root/vdr/scripts/vdrreccmds
diff options
context:
space:
mode:
authorroot <root@elwms02.(none)>2010-04-06 16:13:08 +0200
committerroot <root@elwms02.(none)>2010-04-06 16:13:08 +0200
commit0e7005fcc7483c01aa102fbea358c5ac65a48d62 (patch)
tree11517ce0d3d2977c6732b3aa583b0008083e0bd3 /vdr/scripts/vdrreccmds
downloadx-vdr-0e7005fcc7483c01aa102fbea358c5ac65a48d62.tar.gz
x-vdr-0e7005fcc7483c01aa102fbea358c5ac65a48d62.tar.bz2
hello world
Diffstat (limited to 'vdr/scripts/vdrreccmds')
-rw-r--r--vdr/scripts/vdrreccmds32
1 files changed, 32 insertions, 0 deletions
diff --git a/vdr/scripts/vdrreccmds b/vdr/scripts/vdrreccmds
new file mode 100644
index 0000000..5259b43
--- /dev/null
+++ b/vdr/scripts/vdrreccmds
@@ -0,0 +1,32 @@
+#!/bin/sh
+# 24.06.2007
+
+# Load VDR configuration
+. /etc/default/vdr
+
+function NoadExclude() {
+ Channel="$*"
+ [ -r $VDRCONFDIR/noad-exclude-channels.conf ] || return 1
+ cat $VDRCONFDIR/noad-exclude-channels.conf | while read NewLine; do
+ [ -n "`echo "$Channel" | grep "D\ .*\ -"`" ] && Channel="`echo "$Channel" | cut -c1,2,3`"
+ [ "$NewLine" = "$Channel" ] && killall -9 $(basename $0)
+ done
+}
+
+case "$1" in
+ before)
+ echo "Start recording $2"
+ ;;
+ after)
+ echo "Finished recording $2"
+ [ "$noad" = "on" ] || exit
+ [ $# -ge 3 ] && NoadExclude "$3"
+ $VDRSCRIPTDIR/vdrnoad -start $2
+ ;;
+ edited)
+ echo "Edited recording $2"
+ ;;
+ *)
+ echo "ERROR: unknown state: $1"
+ ;;
+esac \ No newline at end of file