kbhomes/google-music-mac — pull request #33 by anantn (2014-02-25 20:30:34+00:00)
Title: Add support for scrobbling to LastFM

This PR adds rudimentary support for scrobbling to last.fm:

1. A Podfile is included to bring in the 'LastFm' dependency from Cocoapods.

2. Introduces the lastfm.enabled preference, and a basic UI in the preferences pane to enable scrobbling.

3. Scrobbles a track whenever `notifySong` is called. This approach has a number of drawbacks - for example, a track is only scrobbled when the next song starts playing. It also doesn't adhere to a number of requirements from LastFM such as only scrobbling a track if it's played for 30 seconds, don't report nowPlaying tracks unless they've been playing only for 5 seconds etc. It's a start, any further additions will need tweaks to the JS (polling will likely be required instead of relying on MutationObserver).