adds 2 digits for last track for cases when less than 10 tracks (#660)

This commit is contained in:
Jaime Lopez 2020-05-29 10:37:15 -07:00 committed by GitHub
parent ce94f3ee8e
commit 09a773e81d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -39,6 +39,6 @@ do
done < "$2" done < "$2"
# The last track must be done outside the loop. # The last track must be done outside the loop.
echo "From $start to the end: $title" echo "From $start to the end: $title"
file="$escbook/$track-$esctitle.$ext" file="$escbook/$(printf "%.2d" "$track")-$esctitle.$ext"
echo "Splitting \"$title\"..." && ffmpeg -nostdin -y -loglevel -8 -i "$inputaudio" -ss "$start" -vn "$file" && echo "Splitting \"$title\"..." && ffmpeg -nostdin -y -loglevel -8 -i "$inputaudio" -ss "$start" -vn "$file" &&
echo "Tagging \"$title\"..." && tag -a "$author" -A "$booktitle" -t "$title" -n "$track" -N "$total" -d "$year" "$file" echo "Tagging \"$title\"..." && tag -a "$author" -A "$booktitle" -t "$title" -n "$track" -N "$total" -d "$year" "$file"