Changed/fixed some minor things

This commit is contained in:
Medvidek77 2025-02-14 17:18:17 +01:00
parent 03d38e494c
commit 6b1964bca1

10
src/tidler Normal file → Executable file
View file

@ -33,6 +33,11 @@ searchTrack() {
tracks_list+=("$list") tracks_list+=("$list")
done <<< "$tracks" done <<< "$tracks"
if [ "${#tracks_list[@]}" -eq 1 ]; then
echo "No tracks found :("
exit 1
fi
PS3="Please select a track: " PS3="Please select a track: "
select t in "${tracks_list[@]}"; do select t in "${tracks_list[@]}"; do
if [ -n "$t" ]; then if [ -n "$t" ]; then
@ -46,8 +51,7 @@ searchTrack() {
done done
} }
echo "Welcome to Tidal music downloader" echo "Welcome to TiDLer -> Tidal music downloader" && echo ""
echo ""
if [ "$1" = "search" ]; then if [ "$1" = "search" ]; then
if [ "$#" -ge 2 ]; then if [ "$#" -ge 2 ]; then
@ -64,7 +68,7 @@ elif [ "$1" = "download" ]; then
downloadTrack downloadTrack
fi fi
else else
echo "Choose: 1 = download ; 2 = search" echo "Choose 1 for download track or 2 for search track and download"
read option read option
if [ "$option" -eq 1 ]; then if [ "$option" -eq 1 ]; then
downloadTrack downloadTrack