From 0aec6382bdc43fd22013cbad1c1f0c5fb84cfb89 Mon Sep 17 00:00:00 2001 From: AnthonyAxenov Date: Sun, 9 Oct 2022 13:23:20 +0800 Subject: [PATCH] ytdlcue fixes --- tools/ytdlcue.sh | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/tools/ytdlcue.sh b/tools/ytdlcue.sh index b57b68b..9695ee2 100755 --- a/tools/ytdlcue.sh +++ b/tools/ytdlcue.sh @@ -66,9 +66,9 @@ cue_path="$path.cue" # path to cue sheet to be generated exit 3 } -echo "PERFORMER `cat "$json_path" | jq -Mc '.channel'`"> $cue_path -echo "TITLE `cat "$json_path" | jq -Mc '.title'`" >> $cue_path -echo "FILE \"$audio_file\" ${audio_ext^^}" >> $cue_path +echo "PERFORMER `cat "$json_path" | jq -Mc '.channel'`" > "$cue_path" +echo "TITLE `cat "$json_path" | jq -Mc '.title'`" >> "$cue_path" +echo "FILE \"$audio_file\" ${audio_ext^^}" >> "$cue_path" counter=1 # track counter (works only inside loop!) cat "$json_path" | jq -Mc '.chapters[]' \ @@ -82,10 +82,10 @@ cat "$json_path" | jq -Mc '.chapters[]' \ #TODO: what if dash is not delimiter between performer and title? #TODO: take $title2 if $performer and (or?) $title2 are empty - printf "%-2sTRACK $number AUDIO\n" >> $cue_path - printf "%-4sPERFORMER \"$performer\"\n" >> $cue_path - printf "%-4sTITLE \"$title2\"\n" >> $cue_path - printf "%-4sINDEX 01 $time\n" >> $cue_path + printf "%-2sTRACK $number AUDIO\n" >> "$cue_path" + printf "%-4sPERFORMER \"$performer\"\n" >> "$cue_path" + printf "%-4sTITLE \"$title2\"\n" >> "$cue_path" + printf "%-4sINDEX 01 $time\n" >> "$cue_path" counter=`expr $counter + 1` # increase counter done