💄 style(bin): downloadSpotify tab size

This commit is contained in:
Sergio Laín 2024-09-05 15:04:28 +02:00
parent 325f494079
commit 1a9fc5d307
No known key found for this signature in database
GPG key ID: 8429B2EE312F8150

View file

@ -14,10 +14,10 @@ MUSIC_FOLDER="$HOME/music/listen-to"
notify "Started syncing..." notify "Started syncing..."
while IFS= read -r -d '' SPOTDL_FILE; do while IFS= read -r -d '' SPOTDL_FILE; do
spotdl sync "$(basename "$SPOTDL_FILE")"
if [[ -f "$SPOTDL_FILE" && "$SPOTDL_FILE" == *.spotdl ]]; then if [[ -f "$SPOTDL_FILE" && "$SPOTDL_FILE" == *.spotdl ]]; then
FOLDER_NAME=$(basename "$(dirname "$SPOTDL_FILE")") FOLDER_NAME=$(basename "$(dirname "$SPOTDL_FILE")")
cd "$(dirname "$SPOTDL_FILE")" || continue cd "$(dirname "$SPOTDL_FILE")" || continue
spotdl sync "$(basename "$SPOTDL_FILE")"
notify "Synced $FOLDER_NAME" notify "Synced $FOLDER_NAME"
fi fi
done < <(find "$MUSIC_FOLDER" -mindepth 1 -maxdepth 3 -type f -name '*.spotdl' -print0) done < <(find "$MUSIC_FOLDER" -mindepth 1 -maxdepth 3 -type f -name '*.spotdl' -print0)