Skip to content

ostfor/radio_scrobbler

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🎵 Radio Scrobbler

License Python Version Code Style

A Python application that scrobbles songs played on internet radio stations to Last.fm and Spotify.

🚀 Features

  • Scrobbles songs played on internet radio stations to Last.fm and Spotify
  • Supports configuration via YAML file
  • [Coming Soon] GUI version

📦 Installation

pip install .

📖 Usage

Run CLI

radio-scrobble config.yaml

⚙️ Configuration

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"

Last.fm Configuration

  • 🔑 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.

Spotify Configuration

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>?...)

Radio Configuration

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.

📄 License

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! 🎧

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%