Mailing List archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[vdr] Re: Anounce: double episode killer :-)



Hi,

i must admit i never tried mastertimer and vdr,
but as i understand from your post, you point out one
of the draw backs of mastertimer, it a singular solution.

my intention was to use my divx archive (which includes
folders with dummy files for each cd i have) to sort out
doubles, even regardless if vdradmin or myself created them.

this has a broader scope than only the recordings made by
that system itself, but the pay off is that the syntax of the
divx archive must be consistent, the advantage is that even
"imported" avi's/svcd can be taken into account, and nothing
has to be kept track off, since the archives are scanned on
each invocation.

So i learn that mastertimer should have benn on my harddisk
18 moth ago :-)
And writing shell scripts can be a funny way to learn and
customize my vdr.

Thanks for your reply, atleast this explains why i'm the
only one fiddling around with those problems ....

I'll include my last (public) version which now works
as expected and reads a vdr and a divx archive to
filter out doubled recordings(to be correct it deactivates
the timer which would lead to a double recording).
since feedback is low i also warn that it wont work
for anybody anyways :-), since only i use it.

Regards Onno

B.T.W. i also record around 3-5 timer a day, eating 4-8 GB
a day, but i only can tell the GB's of divx, which
came out of that 18 month i use vdr: 251 GB
plus the unconverted 50 GB of vdr recodings waiting to be
converted to the new harddisk arriving next week :-)

Matthias Schniedermeyer schrieb:
On Fri, Aug 15, 2003 at 03:56:11PM +0100, Onno wrote:

Hi list,
based on the thread "vdradmin: how to discard some movie?" and
my need to avoid double recordings caused by vdradmin,i wrote
a tiny bash script to check vdr or divx folders against the
vdr timers. Those recordings are then deactivated.

the only real portability problem may be the fact that
my divx recordings are in folders similar to the vdr
folder tree, thus the leaves end folder name is like 2003-XY-ZY.

If this does not fit your needs and you don't wont to edit
the script, please feel free to reply, i will take care
of that tomorrow.

This was one of the first features in Master-timer.

In 2,5 years i have record around 3000 (2,5 * 365 / 3000 = 3.29 per day)
series and movies. Currently more "done"-file has 2927 entries, but i
deleted around 1000 entries a few days ago. Because of declining DVD-R
prices i have decided to lower the bar for archiving.

That Master-Timer deletes programmed double timers(*), and won't program
them ever again is an other story. :-)

A funny side-effect of this feature is that i don't delete my
"torecord"-entries. Once upan a time, as i tested a new feature, i made
the error to move away my done-list and "eh voila" i had 250 programmed
timers.



*: The run after they got "done".



Bis denn

#!/bin/sh
#
#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
#V 0.0.3 first working version, reduced to only use divx dir (strange chars in vdr foldernames,FIXME)
#        and changed to work with "_" " " differences and the problem of grepping from a pattern list
#V 0.0.4 look's like this could be v1.0, since all features do work:
#		-vdr and divx archives are used
		-
#    
#by okx-at-gmx-dot-de

#set -xv

#uncomment this the first time u use it, to see what would have been done
#DBG=1

TIMERS=/tmp/svdrp-timers.txt
VDR_HOST="127.0.0.1 2001"
NETCAT=/usr/bin/nc
LOG_FILE=/var/log/$(basename $0)-svdrp.log
REC_PATTERN="\/200[0-9]"
#extend here to support diffrerend patterns for divx and vdr archives(TODO)

#one or more dirs containing divx recordings, similar folder format as vdr expected (../2003-xy-yx....)
DIVX_DIRS="/video/disk-01/DIVX/00_Humor/Futurama /video/disk-01/DIVX/00_Humor/Simpsons"


#vdr dir, only cut'ed recordings are taken into account (those with an % in the name)
VDR_DIRS="/video/disk-00/00_Humor/Futurama /video/disk-00/00_Humor/Simpsons"
#

# find_divx_rec
CT=0
for ITEM in $(find $DIVX_DIRS -follow -type d|grep -e "$REC_PATTERN")
    do
    PATTERN_LIST[CT]=$(echo $(basename $(dirname $ITEM)):|sed 's/PREMIERE_AUSTRIA_//g;s/_/ /g')
    [ "z${PATTERN_LIST[CT]}" = "z" ] || CT=$(($CT + 1))
    done

# find_vdr_rec
for ITEM in $(find $VDR_DIRS -follow -type d|grep -e "$REC_PATTERN")
    do
    PATTERN_LIST[CT]=$(echo $(basename $(dirname $ITEM)):|grep "\%"|sed 's/#../\./g'|sed 's/%//g;s/PREMIERE_AUSTRIA_//g;s/-CONVERTED-TO-DIVX//g;s/_/ /g')
    [ "z${PATTERN_LIST[CT]}" = "z" ] || CT=$(($CT + 1))
    done

PATTERN_COUNT=$((${#PATTERN_LIST[@]} - 1))

[ $DBG ] && echo -e "Patternlist= ${PATTERN_LIST[*]}\n\nEnviroment:$(set)"|tee -a $LOG_FILE

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
COUNTER=0
while [ $COUNTER -le $PATTERN_COUNT ]
    do
    cat $TIMERS|grep "${PATTERN_LIST[COUNTER]}"|while read i
		do
			[ "z$i" = "z" ] && break  #some times empty patterns do occur, we now safely break the while..do loop here
			[ $DBG ] && echo -e "i is:$i \n\nPattern is :${PATTERN_LIST[COUNTER]}"|tee -a $LOG_FILE   #some debug stuff
			echo "updt 0:$(echo $i|cut -f2- -d":")">>$TIMERS.update
		done
    COUNTER=$(($COUNTER + 1))
    done
    
echo "quit">>$TIMERS.update
[ $DBG ] || cat $TIMERS.update |$NETCAT -i 2 ${VDR_HOST} >$LOG_FILE
[ $DBG ] && cat $TIMERS.update

echo "Done, for logs see $LOG_FILE."

Home | Main Index | Thread Index