Bitteschön:
Bash
#!/bin/bash
#
# Example:
# R61copy_epgimage_oles <command> <path to .rec>
#
# R61copy_epgimage_oles after /video0/hitec/Doku/%Die_stille_Revolution_der_Mechatronik/2004-04-23.15\:25.50.99.rec
# $1 <command> after
# $2 <path to .rec> /video0/hitec/Doku/%Die_stille_Revolution_der_Mechatronik/2004-04-23.15\:25.50.99.rec
#
case $1 in
after)
echo "Copy EPG-Images to $2"
# eventid for recording
ELINE=`grep "^E " $2/info*`
ELINE=${ELINE//E }
EVENTID=${ELINE// *}
EPGIMAGES=/var/cache/vdr/epgimages/
if [ -f $EPGIMAGES/${EVENTID}_0.jpg ]; then
for i in `ls $EPGIMAGES/${EVENTID}_*.jpg 2>/dev/null`; do
NEWNAME=`basename $i | awk -F_ '{print "thumbnail_"$2}'`
cp $i $2/$NEWNAME
done
fi
;;
*)
echo "Script needs two parameters. See example inside the script."
exit 0
;;
esac
Alles anzeigen
Das Ganze ausführbar machen und nach /usr/share/vdr/recording-hooks legen.
Cheers,
Ole