summaryrefslogtreecommitdiff
path: root/vdr/scripts/timerrep.sh
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/timerrep.sh
downloadx-vdr-0e7005fcc7483c01aa102fbea358c5ac65a48d62.tar.gz
x-vdr-0e7005fcc7483c01aa102fbea358c5ac65a48d62.tar.bz2
hello world
Diffstat (limited to 'vdr/scripts/timerrep.sh')
-rw-r--r--vdr/scripts/timerrep.sh63
1 files changed, 63 insertions, 0 deletions
diff --git a/vdr/scripts/timerrep.sh b/vdr/scripts/timerrep.sh
new file mode 100644
index 0000000..c3d48bb
--- /dev/null
+++ b/vdr/scripts/timerrep.sh
@@ -0,0 +1,63 @@
+#!/bin/sh
+#------------------------------------------------------------------------------
+# this script allows searching for a repeat of timer using epgsearch (>=0.9.3).
+# it requires the timercmd patch from Gerhard Steiner, that extends the timers
+# menu of VDR with commands like in recordings menu
+#
+# add the following lines to your timercmds.conf
+#
+# Search for repeat : /path_of_this_script/timerrep.sh 0
+# Search for repeat (with subtitle): /path_of_this_script/timerrep.sh 1
+#
+# Author: Christian Wieninger (cwieninger@gmx.de)
+#------------------------------------------------------------------------------
+
+source /etc/default/vdr # x-vdr
+
+# adjust the following lines to your config
+# your plugins config dir
+PLUGINCONFDIR=${VDRCONFDIR}/plugins/epgsearch
+# path to svdrpsend.pl
+SVDRPSEND=${VDRBINDIR}/svdrpsend.pl
+# if you are using special subfolders for some recordings, please add them here
+FOLDERS=""
+# the key used to call epgsearch
+EPGSEARCHKEY=user2
+
+# do not edit below this line
+#------------------------------------------------------------------------------
+
+cat << EOM >/tmp/cmd.sh
+
+SEARCHTERM="$6"~"$7";
+#event info not yet present? then extract it from the file name
+if test "\$SEARCHTERM" == "~"; then
+SEARCHTERM='$8'
+#cut leading special folders
+i=0;
+FOLDERS=$FOLDERS;
+while [ "\$LASTWORD" != "\$FOLDERS" ];
+do
+ LASTWORD=\${FOLDERS%%,*};
+ SEARCHTERM=\${SEARCHTERM#*\$LASTWORD~};
+ i=\$i+1;
+ FOLDERS=\${FOLDERS#*,};
+done
+#cut trailing dummy subtitle created by epgsearch
+SEARCHTERM=\${SEARCHTERM%~???_??.??.????-??:??}
+if [ "$1" -eq "0" ]; then
+ SEARCHTERM=\${SEARCHTERM%~*};
+fi
+fi
+
+RCFILE=$PLUGINCONFDIR/.epgsearchrc;
+echo Search=\$SEARCHTERM > \$RCFILE;
+echo SearchMode=0 >> \$RCFILE;
+echo UseDescr=0 >> \$RCFILE;
+$SVDRPSEND HITK $EPGSEARCHKEY;
+EOM
+
+echo ". /tmp/cmd.sh; rm /tmp/cmd.sh" | at now
+
+
+