Mailing List archive

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

[vdr] Re: VDR Feature ideas



> 1) Rotating Recordings
> ======================
> 
> Reserve a limited set of recordings for repeating timers (e.g.
> "Tagesthemen" or "Sandmännchen"). For example, i want to have the 3
> latest transmissions of Sandmännchen (for rainy days) and the last two
> Tagesthemen. The Rotating Recording feature would throw away (in FIFO
> manner) old recordings and keep only the specified number and the latest
> recordings.

I don't think something like this should be build into VDR. A small
script is enough for realizing this. (It simply deletes all, except the
$MAXCOUNT oldest, recordings in the "RECORDING" Subdir)

-- delold.sh --
#!/bin/sh
BASEDIR="/video/video0"
RECORDING="Tagesthemen"
MAXCOUNT=2
cd "$BASEDIR/$RECORDING" || exit 1
count=`ls | wc -l`
if [ $count > $MAXCOUNT ]; then
  let todel=count-MAXCOUNT+1;
  dirtodel=`ls | head -n $todel`
  rm -rf $dirtodel
fi
-- End --

Correct the Dirs, set the count (Copy the block any number of times for
other subdirs). Run it via "commands" (Maybe you need "echo Someting" to
make VDR happy, don't know since i don't use commands in VDR) or via
cron. And you're set.

Btw. You ment "Ring"(-Buffer) and not FIFO.

Klaus: Maybe this is something for the contrib dir/package.






Bis denn

-- 
Real Programmers consider "what you see is what you get" to be just as 
bad a concept in Text Editors as it is in women. No, the Real Programmer
wants a "you asked for it, you got it" text editor -- complicated, 
cryptic, powerful, unforgiving, dangerous.




Home | Main Index | Thread Index