fix the script to deal with toml format

This commit is contained in:
Jason Tian 2023-03-08 09:37:14 +08:00
parent 258d4cb72a
commit 12cf782015
1 changed files with 1 additions and 1 deletions

View File

@ -16,7 +16,7 @@ then
fi
if [ ${FIRSTLINE:0:3} == "+++" ]
then
mp3="https://"$(cat "$i" | grep "^mp3 =" | awk -F' ' '{print $2}')
mp3="https://"$(cat "$i" | grep "^mp3 =" | awk -F'"' '{print $2}')
duration=$(ffprobe -i "$mp3" -show_entries format=duration -v quiet -of csv="p=0" -sexagesimal)
length=$(ffprobe -i "$mp3" -show_entries format=size -v quiet -of csv="p=0")
sed -i "s/^duration = .*/duration = \"$duration\"/g" "$i"