Skip to content

Get the current song name and artist from Google Play Music Desktop Player and put it into a text file.

License

Notifications You must be signed in to change notification settings

mattcan/GPMDP-Reader

Repository files navigation

GPMDP Reader

A utility to take the current song from Google Play Music Desktop Player and stuff it into a text file of your choosing. The original intent was to show the current song while streaming using the OBS Text Source.

This is an alpha project, many sharp edges. Feel free to leave an issue if you get cut

How to use

Enable an API

GPMDP offers two different APIs: JSON and Playback.

The Playback API is more stable but involves GPMDP starting up a web server, which can be resource intensive for some and a security concern. Playback API also allows other applications to control your music. This application does not do that.

If you start both APIs, I'm not sure why you would, this application will prefer the Playback API.

Start application

Next, run this utility from a terminal or command prompt and pass in the location of the JSON output and where you want to save the song title. Since there isn't a packaged build yet, you will need to use dotnet run.

git clone https://github.com/mattcan/GPMDP-Reader.git
cd GPMDP-Reader
dotnet run \
    ~/.config/Google\ Play\ Music\ Desktop\ Player/json_store \
    ~/StreamAssets/current_song.txt

If you need to find out where the JSON API is writing to, checkout the official unofficial documentation. Just don't include the playback.json file in the path, things will not work.

Using with OBS

Once things are running, you can use the Text Source in OBS Studio to read from a file.

Stop it

To exit the GPMDP Reader, pop over to your terminal and then you can press q followed by Enter or press the combination of Ctrl+c.

About

Get the current song name and artist from Google Play Music Desktop Player and put it into a text file.

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages