summaryrefslogtreecommitdiff
path: root/scripts/timercmds-auxinfo.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/timercmds-auxinfo.sh
downloadvdr-plugin-epgsearch-8d4f8607dc1558ce73eb4c376bdbf78ddb65da83.tar.gz
vdr-plugin-epgsearch-8d4f8607dc1558ce73eb4c376bdbf78ddb65da83.tar.bz2
Initial commit
Diffstat (limited to 'scripts/timercmds-auxinfo.sh')
-rwxr-xr-xscripts/timercmds-auxinfo.sh60
1 files changed, 60 insertions, 0 deletions
diff --git a/scripts/timercmds-auxinfo.sh b/scripts/timercmds-auxinfo.sh
new file mode 100755
index 0000000..0a89a6a
--- /dev/null
+++ b/scripts/timercmds-auxinfo.sh
@@ -0,0 +1,60 @@
+#!/bin/bash
+#
+# Displays the AUX-Info from timers
+#
+# Use it as command in timercmds.conf
+#
+# Example:
+#
+# Display AUX info : /usr/local/bin/timercmds-auxinfo.sh
+#
+# 2006-04-24 vejoun @ vdrportal
+# Version 0.4
+#
+
+#<Configuration>
+
+# Your timers.conf
+TIMERS="/etc/vdr.conf/timers.conf"
+
+#</Configuration>
+
+CHANNELID="$2"
+START="$3"
+TITLE="$5"
+SUBTITLE="$6"
+DIR="$7"
+
+TIME="$(awk 'BEGIN{print strftime("%Y-%m-%d:%H%M",'$START')}')" || exit $?
+
+SEARCH="[0-9]*:${CHANNELID}:${TIME}:[0-9]*:[0-9]*:[0-9]*:${DIR//:/|/}:"
+
+AUX="$(egrep -m 1 "$SEARCH" "$TIMERS" | cut -d":" -f9-)"
+
+if [ -n "$TITLE" ]; then
+ echo -e "TITLE:\n$TITLE\n"
+else
+ echo -e "TITLE:\nTimer off, no title available\n"
+fi
+
+if [ -n "$SUBTITLE" ]; then
+ echo -e "SUBTITLE:\n$SUBTITLE\n"
+else
+ if [ -n "$TITLE" ]; then
+ echo -e "SUBTITLE:\nNo subtitle available\n"
+ else
+ echo -e "SUBTITLE:\nTimer off, no subtitle available\n"
+ fi
+fi
+
+if [ -n "$DIR" ]; then
+ echo -e "PATH:\n$DIR\n"
+fi
+
+if [ -z "$AUX" ]; then
+ echo -e "AUX:\nNo AUX data found\n"
+else
+ echo -e "AUX:\n${AUX//></>\\n<}\n"
+fi
+
+#EOF