Google Music Watcher


#1

I have hacked together a watcher for the Google Music website as a tampermonkey/greasemonkey script. It’s largely based on the chrome extension and uses the same “currently-playing” event that the Spotify watcher uses.

The script itself can be downloaded here:
https://git.zyrenth.com/kabili/user-scripts/raw/branch/master/ActivityWatch%20-%20Google%20Music.user.js


#2

That’s awesome, will take a further look at it!

Which Spotify watcher? The only one I know of is aw-watcher-spotify and that works completely differently by using the Spotify API.


#3

I was referring to the ActivityWatch bucket event type. I’m using the same non-standard “currently-playing” bucket event type that aw-watcher-spotify is using. I wanted to point it out since there is currently no defined event type for tracking music, so I opted for consistency.

This userscript has to resort to scraping the page since Google Music doesn’t have any kind of API.

I’m also working on a watcher for any media player that supports the MPRIS2 protocol on Linux, so it may be good to have a standard event type for music and other media.