A Python application that scrobbles songs played on internet radio stations to Last.fm and Spotify.
- Scrobbles songs played on internet radio stations to Last.fm and Spotify
- Supports configuration via YAML file
- [Coming Soon] GUI version
pip install .
radio-scrobble config.yaml
The project requires a configuration file in YAML format (config.yaml
). The structure of the configuration file should be as follows:
lastfm:
api_key: key
shared_secret: secret
user_name: user
md5_password: hash
spotify:
client_id: YOUR_SPOTIFY_CLIENT_ID
client_secret: YOUR_SPOTIFY_CLIENT_SECRET
redirect_url: YOUR_SPOTIFY_REDIRECT_URL
spotify_playlist_id: YOUR_SPOTIFY_PLAYLIST_ID
radios:
- name: Radio 1
stream_url: "http://us2.internet-radio.com:8443"
- 🔑
api_key
: The API key obtained from Last.fm. - 🔒
shared_secret
: The shared secret obtained from Last.fm. - 👤
user_name
: The Last.fm username. - 🔐
md5_password
: The MD5 hash of the Last.fm password.
You need an API account. It can be created here.
The spotify section is optional and allows you to configure scrobbling to Spotify. It should have the following properties:
- 🔑
client_id
: Your Spotify client ID. Obtain this from the Spotify Developer Dashboard. - 🔑
client_secret
: Your Spotify client secret. Obtain this from the Spotify Developer Dashboard. - 🔑
redirect_url
: The redirect URL for your application. This can be set to http://localhost:8888/callback for console-based apps. - 🎶
spotify_playlist_id
: The ID of the playlist where scrobbled songs will be added.
Auth data should be copied form spotify app. It could be simply created from Dev dashboard
You can copy Share Link to playlist and copy id which follows
playlist/
. (Example:https://open.spotify.com/playlist/<playlist id>?...
)
The radios
section allows you to specify multiple radio stations. Each radio station should have the following properties:
- 📻
name
: The name of the radio station. - 🔊
stream_url
: The URL of the radio station's audio stream.
This project is licensed under the MIT License - see the LICENSE.md file for details.
🎶 Enjoy scrobbling your favorite tunes to Last.fm and Spotify! 🎧