Skip to main content

Scrobble music to last.fm from Chromecast.

Project description

Scrobble music playing on Chromecast devices to last.fm

Because I was annoyed that Spotify doesn’t scrobble to last.fm when using Chromecast. Currently will scrobble tracks playing on Spotify and Google Play Music.

pip install lastcast

To setup a configuration for lastcast, either modify example.lastcast.toml as necessary and write it to ~/.lastcast.toml, or use the config creation tool:

lastcast --wizard

Once the configuration file is in place, run lastcast to connect to the Chromecast and start scrobbling.

Detailed macOS setup

(for anyone not familiar with Python and pip)

Enter the following commands in your Terminal (Terminal.app, iTerm2, etc.):

  1. sudo easy_install pip

  2. sudo pip install --upgrade lastcast --ignore-installed six

  3. lastcast --wizard

This will prompt you to create a last.fm API application and then ask for your login information, which will only be stored locally on your computer.

You may get an error on step 2 about cc missing. If this is the case, install xcode by running xcode-select --install and retry step 2.

Now everything should be set up. When you want to start scrobbling, simply run lastcast in the terminal.

Generally, I run lastcast like so: while true; do lastcast; sleep 5; done. This will help if you frequently move networks or sleep and resume your laptop, as lastcast currently isn’t very resilient to these changes (PRs welcome!)

No Chromecast devices found?

It is possible that an incompatible version of netifaces will prevent lastcast from finding any Chromecast devices on your network. This is known to affect Windows 10 with netifaces==0.10.5 installed.

The fix, as described in this StackOverflow answer is simply to uninstall the wrong version and manually install netifaces==0.10.4.

$ pip uninstall netifaces
$ pip install netifaces==0.10.4

If you still can’t discover any Chromecasts, please open an issue.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

lastcast-0.1.2.tar.gz (4.2 kB view details)

Uploaded Source

File details

Details for the file lastcast-0.1.2.tar.gz.

File metadata

  • Download URL: lastcast-0.1.2.tar.gz
  • Upload date:
  • Size: 4.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for lastcast-0.1.2.tar.gz
Algorithm Hash digest
SHA256 7f9c8887c52be08138dbb42d7a2311f646291cdfd98cf7f7085e1c5ec359ed01
MD5 b784b38fca9047da3ded973522c8a762
BLAKE2b-256 796b9c9e0ea4e3074c1bced4fbb70be3f0167066472e112f8dbeeff7a7d02e1c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page