fix the script to deal with toml format
This commit is contained in:
parent
258d4cb72a
commit
12cf782015
|
@ -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"
|
||||
|
|
Loading…
Reference in New Issue