dotfiles/.local/bin/downloadSpotify

27 lines
567 B
Bash
Executable file

#!/usr/bin/bash
if ! command -v spotdl &>/dev/null; then
notify-send "Spotdl Sync" "Error: spotdl is not installed" --icon=spotify --app-name=spotify
exit 1
fi
FOLDERS=(
"EDM-House"
"Metal-Rock"
"Synth-Chill"
"Lofi-Sleppy"
"Space-Cyberpunk"
"Cyberpunk-Darksynth"
)
notify-send "Spotdl Sync" "Started syncing..." --icon=spotify --app-name=spotify
for FOLDER in "${FOLDERS[@]}"; do
cd "$HOME/Musica/Listen-To/$FOLDER" || continue
spotdl sync "${FOLDER,,}.sync.spotdl"
notify-send "Spotdl Sync" "$FOLDER synced"
done
notify-send "Spotdl Sync Complete"