A simple Raspberry Pi application that displays the album art of your currently playing Spotify track in fullscreen.
CoverSpot displaying album art on a Raspberry Pi
- Raspberry Pi with a display (or any Linux machine)
- Python 3
- A Spotify account
- A Spotify Developer App
- Install system dependencies:
sudo apt update
sudo apt install python3-pip python3-pygame- Install Python dependencies:
pip3 install spotipy requests pillow- Download the script:
wget https://raw.githubusercontent.com/andreacampanella/coverspot/main/coverspot.py- Go to the Spotify Developer Dashboard
- Create a new application
- In your app settings, add this redirect URI:
http://127.0.0.1:8888/callback
- Note your Client ID and Client Secret
Run the application:
python3 coverspot.pyOn first run, you will be prompted to enter your Spotify Client ID and Client Secret. These are saved to ~/.config/CoverSpot/config.json.
You will then be given a URL to open in any browser. After logging in to Spotify, you will be redirected to a page that fails to load. This is expected. Copy the entire URL from your browser address bar and paste it into the terminal.
Once authenticated, the application will display album art for whatever is playing on your Spotify account.
Press ESC to exit.
All configuration is stored in ~/.config/CoverSpot/:
config.json- Your Spotify API credentialstoken_cache- Your authentication token
To reset the application, remove the config directory:
rm -rf ~/.config/CoverSpotTo run CoverSpot automatically when your Raspberry Pi boots, add it to your autostart:
mkdir -p ~/.config/autostart
cat > ~/.config/autostart/coverspot.desktop << EOF
[Desktop Entry]
Type=Application
Name=CoverSpot
Exec=python3 /path/to/coverspot.py
EOFReplace /path/to/coverspot.py with the actual path to the script.
MIT