summaryrefslogtreecommitdiff
path: root/scripts/epg2master-timer.sh
diff options
context:
space:
mode:
authorChristian Wieninger <winni@debian.(none)>2007-11-11 15:40:28 +0100
committerChristian Wieninger <winni@debian.(none)>2007-11-11 15:40:28 +0100
commit8d4f8607dc1558ce73eb4c376bdbf78ddb65da83 (patch)
treed0c5dde81a36ab2e8a2edc7c1e6922556518b312 /scripts/epg2master-timer.sh
downloadvdr-plugin-epgsearch-8d4f8607dc1558ce73eb4c376bdbf78ddb65da83.tar.gz
vdr-plugin-epgsearch-8d4f8607dc1558ce73eb4c376bdbf78ddb65da83.tar.bz2
Initial commit
Diffstat (limited to 'scripts/epg2master-timer.sh')
-rwxr-xr-xscripts/epg2master-timer.sh37
1 files changed, 37 insertions, 0 deletions
diff --git a/scripts/epg2master-timer.sh b/scripts/epg2master-timer.sh
new file mode 100755
index 0000000..0a1eef3
--- /dev/null
+++ b/scripts/epg2master-timer.sh
@@ -0,0 +1,37 @@
+#!/bin/sh
+#
+# epg2master-timer.sh
+#
+# source: epgsearch-plugin, taken from vdr-wiki.de
+# author: Christian Jacobsen / Viking (vdrportal)
+#
+# add this line to your epgsearchcmds.conf:
+# folgende zeile in die epgsearchcmds.conf eintragen:
+#
+# epg2master-timer : /path_to_this_script/epg2master-timer.sh
+# epg2master-timer (no subtitle) : /path_to_this_script/epg2master-timer.sh -nosub
+
+# CONFIG START
+ MASTERTIMER_FILE=/etc/master-timer/torecord
+# CONFIG END
+
+if touch $MASTERTIMER_FILE >/dev/null 2>&1 ; then
+ USESUB=yes
+ if [ "$1" = -nosub ] ; then
+ USESUB=no
+ fi
+
+ # add timer
+ printf "\nAdding Master-Timer :\n"
+ printf "\n[$1]\nTitle = $1\n" | tee -a $MASTERTIMER_FILE
+ if [ "$6" != "" -a $USESUB = yes ] ; then
+ printf "Subtitle = $6\n" | tee -a $MASTERTIMER_FILE
+ fi
+
+ # with "^" and "$" so that the exact channel name is used.
+ printf "Channel = ^$5\$\n" | tee -a $MASTERTIMER_FILE
+ printf "\n\nLast 10 lines of torecord : \n\n"
+ tail -10 $MASTERTIMER_FILE
+else
+ echo "Error, cannot open file ($MASTERTIMER_FILE)..."
+fi