A small utility to backup all your Spotify playlists including the folder structure. As the Spotify API does not support folders, the folder structure is reconstructed from the Spotify cache with spotify‑folders (all credit to mikez).
Playlists are automatically resolved to albums where appropriate. In this case, the individual tracks are not included in the backup.
- Prepare Spotify
- Clear cache in Spotify settings
- [Windows only] Fully close Spotify (Alt+F4)
- Prepare script
- Add Spotify Web API credentials to
credentials.yaml
- [Optional] Specify a custom cache directory, account, or folder
by running spotify‑folders and writing the result to
folders.json
- Add Spotify Web API credentials to
- Run script
- Set up Python environment with Python >= 3.9
- Install dependencies with
pip install -r requirements.txt
- Run with
python src/main.py
- Result can be found in
Backup