this was the script I used to download my youtube playlist, you can modify it to do spotify also:
#!/bin/bash
PLAYLIST_URL="$1"
if [ -z "$PLAYLIST_URL" ]; then
echo "Usage: $0 <youtube_playlist_url>"
exit 1
fi
# Log file with timestamp
LOG_FILE="$HOME/music-downloads/download_$(date +%Y%m%d_%H%M%S).log"
echo "Starting download at $(date)" | tee "$LOG_FILE"
echo "Playlist: $PLAYLIST_URL" | tee -a "$LOG_FILE"
echo "----------------------------------------" | tee -a "$LOG_FILE"
# Run sldl with YouTube playlist
sldl "$PLAYLIST_URL" --yt-dlp 2>&1 | tee -a "$LOG_FILE"
echo "----------------------------------------" | tee -a "$LOG_FILE"
echo "Download completed at $(date)" | tee -a "$LOG_FILE"
I just ran this in a screen session. You don't have to log everything but I did it so I could check to see what songs weren't on soulseek from my playlist.