Code Monkey home page Code Monkey logo

gpmdp-reader's Introduction

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.

gpmdp-reader's People

Contributors

mattcan avatar

Watchers

 avatar

gpmdp-reader's Issues

Automatically find JSON API file

Currently, the application starts from the command line and takes two parameters: where the JSON API file is located and the location to save the output. The directories for each OS are already known so it is possible to automatically search for the JSON API file without asking the user to find it.

Acceptance Criteria

  • able to determine what OS is being used
  • automatically search the path related to the current OS
  • remove the ability to pass in a path

It is ok to hardcode the paths into the application, it likely won't change often.

Resources

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.