From 25987e83a85d0f86300da97a6d41f2ba6fc0ea36 Mon Sep 17 00:00:00 2001 From: Andreas Mair Date: Sat, 19 Mar 2011 11:35:37 +0100 Subject: Merged from v1.3-devel branch: added ability to configure items that should be shown in recording list. --- contrib/vdr-getyearfrominfo.sh | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100755 contrib/vdr-getyearfrominfo.sh (limited to 'contrib/vdr-getyearfrominfo.sh') diff --git a/contrib/vdr-getyearfrominfo.sh b/contrib/vdr-getyearfrominfo.sh new file mode 100755 index 0000000..9ffa913 --- /dev/null +++ b/contrib/vdr-getyearfrominfo.sh @@ -0,0 +1,19 @@ +#!/bin/sh + +# old info file +infofile="$1/info.vdr" + +# use new info file if available +if [ -e "$1/info" ]; then + infofile="$1/info" +fi + +#try "|Year: XXXX|" first +year=`cat "${infofile}" | grep '|Year:' | sed -e 's/.*|Year: \([0-9]*\)|.*/\1/g'` +#echo "year1:>${year}<" + + +if [ ! "$year" == "" ]; then + echo "${year}" > "$1/year.vdr" + echo "${year}" +fi -- cgit v1.2.3