From cd7eef9c10da253c9496c2c063b24c600b9d9a94 Mon Sep 17 00:00:00 2001 From: Damien De Paoli Date: Sat, 16 Aug 2025 11:09:22 +1000 Subject: [PATCH] fix output formatting issues so these really work with apostrophes in the content --- create_nfo_for_all_mythtv_recordings | 13 ++++++++----- create_nfo_for_one_recording | 5 ++++- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/create_nfo_for_all_mythtv_recordings b/create_nfo_for_all_mythtv_recordings index 35deb57..20e8469 100755 --- a/create_nfo_for_all_mythtv_recordings +++ b/create_nfo_for_all_mythtv_recordings @@ -8,7 +8,7 @@ rm $DIR/*.nfo for i in $DIR/*.ts do basename=`basename $i` - base="${basename%.*}" + base="${basename%.*}" echo "Need to create a nfo for $base" @@ -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 "" >> $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: $outline" >> $nfo else echo "$title" >> $nfo fi - echo "$plot" >> $nfo + echo "" >> $nfo echo "$date" >> $nfo echo "" >> $nfo - sudo chown mythtv:mythtv $nfo + chown mythtv:mythtv $nfo done diff --git a/create_nfo_for_one_recording b/create_nfo_for_one_recording index 81b5ab9..b8de39c 100755 --- a/create_nfo_for_one_recording +++ b/create_nfo_for_one_recording @@ -33,8 +33,11 @@ echo "" >> $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: $outline" >> $nfo @@ -42,7 +45,7 @@ else echo "$title" >> $nfo fi -echo "$plot" >> $nfo +echo "" >> $nfo echo "$date" >> $nfo echo "" >> $nfo sudo chown mythtv:mythtv $nfo