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
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.
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.
Once things are running, you can use the Text Source in OBS Studio to read from a file.
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.