Mailing List archive

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

[vdr] Re: Sort recordings in sub-menus and simply hide recordings



Hello,

try this one :


#!/bin/bash
basename=`basename $0`
TMPFILE=/tmp/$basename.tmp

function hide_it ()
{
  find $dir -name *.rec > $TMPFILE
  for old in `cat $TMPFILE`; do
        new=`tr ".rec" ".hid" <<EOF
$old
EOF`;
        mv $old $new
  done;
}
function unhide_it ()
{
  find $dir -name *.hid > $TMPFILE
  for old in `cat $TMPFILE`; do
        new=`tr ".hid" ".rec" <<EOF
$old
EOF`;
        mv $old $new
  done;
}

if [ ! $1 ]; then echo "Usage: $basename directory [-u]"
exit 1;
fi;

if [ ! $2 ]; then dir=$1;

elif
  [ $1 = '-u' ]; then unhide="true";
        dir=$2;
  elif [ $2 = '-u' ]; then unhide="true";
        dir=$1;

fi


if [ ! $unhide ]; then hide_it;
else unhide_it;
fi



Regards,

Gerhard



Marcus Kuba wrote:

>Am 04.11.2001 20:23:20, schrieb Klaus Schmidinger <Klaus.Schmidinger@cadsoft.de>:
>
>>>Another useful thing would be a simple way to hide a recording from the
>>>recordings menu. Not everyone, who uses the TV has to see, what I did record.
>>>This could simply be a directory like /video/hidden, where I can move a
>>>complete recording subdir and this is no more shown in the recordings menu.
>>>And simply move it back to watch it.
>>>
>>You could use the usual Linux 'mv' command to achieve this.
>>
>
>If moving alone would be enough one could even use 'mc'.
>But then VDR finds every recording in the /video-tree regardless how deep in the subdirs 
>it is 'hidden'. One also has to change the '.rec' to something else... and then its getting 
>away from 'simple'.
>
>Greetings,   Marcus
>
>
>
>






Home | Main Index | Thread Index