2009-05-22, 15:15
Here is a little script that generates the necessary files:
its quick and dirty, but works - maybe you want to put more features in ...
Code:
#!/bin/bash
VDRREC="/mnt/nas/videos/vdr"
TVFILE="../tvshow.nfo"
for i in $(find $VDRREC -name info.vdr)
do
VDRDIR=$(dirname $i)
VDRFILE=$(basename $i)
cd $VDRDIR
if [ -f info.vdr ];then
TITLE=$(grep "^T " info.vdr | sed "s/^T //")
INHALT=$(grep "^D " info.vdr | sed "s/^D //")
EPISODE=$(grep "^S " info.vdr | sed "s/^S //")
if [ -z "$EPISODE" ];then
EPISODE="$TITLE"
fi
fi
echo "<tvshow>" > $TVFILE
echo "<title>$TITLE</title>" >> $TVFILE
echo "<plot> </plot>" >> $TVFILE
echo "</tvshow>" >> $TVFILE
echo "<episodedetails>" > 001.nfo
echo "<title>$EPISODE</title>" >> 001.nfo
echo "<rating></rating>" >> 001.nfo
echo "<season></season>" >> 001.nfo
echo "<episode></episode>" >> 001.nfo
echo "<plot>$INHALT</plot>" >> 001.nfo
echo "<credits></credits>" >> 001.nfo
echo "<director></director>" >> 001.nfo
echo "<aired></aired>" >> 001.nfo
echo "<actor></actor>" >> 001.nfo
echo "</episodedetails>" >> 001.nfo
done
its quick and dirty, but works - maybe you want to put more features in ...