Mailing List archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[vdr] Re: Anounce: double episode killer :-) missing attachment
OK, im too stupid :-)
here is the script as attachment...
Regards Onno
#!/bin/sh
#set -xv
#to deactivate vdr autotimers which match the .at but not wanted by the user
#V 0.0.1 initial version
#V 0.0.2 now reads divx and vdr folders to generate a list of unwanted recordings
# from the recordings we allready have, so avoiding double episodes
#by okx-at-gmx-dot-de
TIMERS=/tmp/svdrp-timers.txt
VDR_HOST="127.0.0.1 2001"
NETCAT=/usr/bin/nc
LOG_FILE=$(dirname $0)/svdrp.log
REC_PATTERN="\/200[0-9]"
#extend here to support diffrerend patterns for divx and vdr archives
#one or more dirs containing divx recordings, same folder format as vdr expected (../2003-xy-yx....)
DIVX_DIRS="/video/disk-01/DIVX/00_Humor/Simpsons"
#vdr dir, only cut'ed recordings are taken into account
VDR_DIRS="/video/disk-00/00_Humor/Simpsons"
f_find_divx_rec(){
for ITEM in $(find $1 -follow -type d|grep -e "$REC_PATTERN")
do
printf "$(echo $(basename $(dirname $ITEM))|sed 's/PREMIERE_AUSTRIA_//g') "
done
}
f_find_vdr_rec(){
for ITEM in $(find $1 -follow -type d|grep -e "$REC_PATTERN")
do
printf "$(echo $(basename $(dirname $ITEM))|grep "\%"|sed 's/%//g;s/PREMIERE_AUSTRIA_//g') "
done
}
PATTERN_LIST="$(f_find_divx_rec $DIVX_DIRS) $(f_find_vdr_rec $VDR_DIRS)"
echo -e "lstt\nquit"|$NETCAT -i 2 ${VDR_HOST} |grep -v -e "^22[01] "|sed 's/^250.[0-9]* //g' > $TIMERS
rm -f $TIMERS.update
for PATTERN in $PATTERN_LIST
do
cat $TIMERS|grep "$PATTERN"|while read i
do
echo "updt 0:$(echo $i|cut -f2- -d":")">>$TIMERS.update
done
done
echo "quit">>$TIMERS.update
cat $TIMERS.update |$NETCAT -i 2 ${VDR_HOST} >$LOG_FILE
echo "Done, for logs see $LOG_FILE."
Home |
Main Index |
Thread Index