Update src/tidler

This commit is contained in:
Medvidek77 2025-04-22 15:03:27 +02:00
parent e1599f840c
commit aff1349fe1

View file

@ -183,27 +183,25 @@ searchTrack() {
echo "No tracks found :("
exit 1
else
i=0
while [ "$i" -lt "${#tracks_list[@]}" ]; do
echo "$((i + 1))) ${tracks_list["$i"]}"
while [ "$i" -lt "${#tracks_list[@]}" ]; do
echo "$((i + 1))) ${tracks_list["$i"]}"
i=$(( i + 1 ))
done
read -a inp
echo "${inp[0]}"
i=0
while [ "$i" -lt "${#inp[@]}" ]; do
inp2=$(("${inp[i]}" - 1))
if [ "$inp2" -ge 0 ] && [ "$inp2" -lt "${#tracks_list[@]}" ]; then
track_id=$(echo "${tracks_list["$inp2"]}" | awk -F ' - ' '{print $1}')
downloadTrack "$track_id"
else
echo "Invalid selection. Please try again."
done
read -a inp
echo "${inp[0]}"
i=0
while [ "$i" -lt "${#inp[@]}" ]; do
inp2=$(("${inp[i]}" - 1))
if [ "$inp2" -ge 0 ] && [ "$inp2" -lt "${#tracks_list[@]}" ]; then
track_id=$(echo "${tracks_list["$inp2"]}" | awk -F ' - ' '{print $1}')
downloadTrack "$track_id"
else
echo "Invalid selection. Please try again."
fi
i=$(( i + 1 ))
done
fi
i=$(( i + 1 ))
done
fi
}