fix output formatting issues so these really work with apostrophes in the content

This commit is contained in:
2025-08-16 11:09:22 +10:00
parent 968c171dae
commit cd7eef9c10
2 changed files with 12 additions and 6 deletions

View File

@@ -23,25 +23,28 @@ do
if [ x"$small" != "x" ]; then
echo "WARNING: $i is less than 500M"
echo "WARNING: `ls -lh $i`"
sudo rm $i
rm $i
fi
fi
nfo="$DIR/$base.nfo"
sudo rm -f $nfo
rm -f $nfo
echo "<movie>" >> $nfo
# think Emby doesnt process &'s, so switch them over
title=${title//&/and}
title=${title//\'/}
outline=${outline//&/and}
outline=${outline//\'}
plot=${plot//&/and}
plot=${plot//\'}
if [ x"$outline" != "x" ]; then
echo "<title>$title: $outline</title>" >> $nfo
else
echo "<title>$title</title>" >> $nfo
fi
echo "<plot>$plot</plot>" >> $nfo
echo "<plot><![CDATA[$plot]]></plot>" >> $nfo
echo "<date>$date</date>" >> $nfo
echo "</movie>" >> $nfo
sudo chown mythtv:mythtv $nfo
chown mythtv:mythtv $nfo
done

View File

@@ -33,8 +33,11 @@ echo "<movie>" >> $nfo
# think Emby doesnt process &'s, so switch them over
title=${title//&/and}
title=${title//\'/}
outline=${outline//&/and}
outline=${outline//\'/}
plot=${plot//&/and}
plot=${plot//\'/}
if [ x"$outline" != "x" ]; then
echo "<title>$title: $outline</title>" >> $nfo
@@ -42,7 +45,7 @@ else
echo "<title>$title</title>" >> $nfo
fi
echo "<plot>$plot</plot>" >> $nfo
echo "<plot><![CDATA[$plot]]></plot>" >> $nfo
echo "<date>$date</date>" >> $nfo
echo "</movie>" >> $nfo
sudo chown mythtv:mythtv $nfo