Fix text and fix progress bar

This commit is contained in:
Medvidek77 2025-03-20 20:55:33 +01:00
parent 3015d24698
commit 6bad8f3055

View file

@ -42,10 +42,10 @@ if [ -n "$MAX_ATTEMPTS" ]; then
echo "Bad MAX_ATTEMPTS option. Allowed are numbers from 1 to 100."
echo "Using default value..."
max_attempts=10 # Default value
max_attempts="10" # Default value
fi
else
max_attempts=10 # Default value
max_attempts="10" # Default value
fi
downloadTrack() {
@ -82,7 +82,7 @@ downloadTrack() {
url=$(echo "$json_data" | jq -r '.[-1].OriginalTrackUrl // empty')
if [ -n "$url" ]; then
cover_data=$(curl -s "$proxy_url/cover/?id=$id")
cover_data=$(curl -# "$proxy_url/cover/?id=$id")
cover_url=$(echo "$cover_data" | jq -r '.[]["1280"] // empty')
if [ -n "$cover_url" ]; then
@ -124,8 +124,8 @@ downloadTrack() {
mkdir -p "$final_path"
curl "$url" -o "$final_path/$filename"
curl "$cover_url" -o "$final_path/$cover_name"
curl -# "$url" -o "$final_path/$filename"
curl -# "$cover_url" -o "$final_path/$cover_name"
# Metadata
metaflac \
@ -304,7 +304,7 @@ elif [ "$1" = "help" ]; then
echo ""
echo "download {song_id}-optional -> download any song"
echo ""
echo "album {album_name}-> search and download any album"
echo "album {album_name}-optional -> search and download any album"
echo ""
echo "help -> print this message and exit"
else