Google-play-music-desktop-player-unofficial-: Websocket API enhancement

Created on 30 Mar 2016  路  10Comments  路  Source: MarshallOfSound/Google-Play-Music-Desktop-Player-UNOFFICIAL-

Hey There!
First of all thank you for this awesome player!

In my free time I'm working on an small Android/iOS app to remote control the GPMDP using the websocket interface. Here you can find a short preview of it, and here the repo (please don't mind the UI, it's still a work in progress).
The main purpose of this project was remote controlling the Radio stations, and it seems to works well so far on it... but I'd also like to expand it and do something more useful, like controlling the catalog.

The biggest problem I'm facing is that there are no way to get information on the available tracks that can be played from catalog in the gmusic endpoints. This means that if a catalog playlist ends there are no way to use the app to start a new track or even to re-start the same playlist.

Are there any plans on adding more websocket API endpoints?
I'm not confident on it (because, if I understood correctly how GPMDP works, it's simply not possible to have information on the catalog).

Thank you for your time and have a good day.

P.S.: Gmusic's .on('change:shuffle')and .on('change:repeat') currently are not exposed by GPMDP

statuhelp-wanted typbug typenhancement

All 10 comments

First off I just want to say, dayum...

This is exactly the kind of thing I was hoping people would use the API's for :+1:

Now to addressing your issue

  1. In terms of getting a list of all songs available to the user, that's a straight up no go. Google doesn't make it easy to fetch this information (they have no official API) and trawling through HTML pages manually and storing the data seems silly and costly.
  2. That said there is some limited song information / actions I could technically provide. It's technically possible to capture the current queue (past, current and future songs) and offer actions based on that E.g. Play album, Play radio based on this song This would require some JS magic which I might get around to doing at some point, especially considering that remote is definitely something I would use.
  3. I could also offer up a list of playlists and allow them to choose from those.
  4. As for the change:shuffle and change:repeat not being exposed, yep, I'll get on to that :+1:

Keep up the great work on that remote :+1: Looking forward to seeing a published version on the app stores :+1:

Thanks @MarshallOfSound, I'll keep you updated on the app progress :+1:

...And let me know if I can help in any way!

I looked into this a little also and noticed the Unified Remote for Google Music (browser) 'just works' for a lot of the GPMDP controls (play/pause, rating, shuffle, repeat, search etc). Unified Remote gets the data/info from from its own local server using a configured LUA script file.

Not to take away from your work, @mmazzarolo , but seems like Unified may have some tools already in place to leverage the json api here...plus I'm a bit of a UR 'fan' too :+1: if you're preferring your own, I'd be happy to help there too!! Looking into that now.

No worries :)
As I said I initially started this project to just handle the Radio stations :)

Just curious, search on Unified Remote is working too? Not bad at all :+1:

Cool deal! Unified Remote does look a little dated, especially compared to even your preview.

Search itself does work from UR, but there's no current way to browse/select results :smile: . This is the equivalent of pressing the "/" keyboard key. There may be other helpful keycodes too, if you haven't seen those yet, type '?' to display the chart on GPM Desktop or Web.

@mmazzarolo I just pushed an update to the websocket api that includes change:repeat and change:shuffle

@mmazzarolo Also do you want / need theme endpoints for the WebSocket API. So that the remote can have the same theme colors as the main application

@MarshallOfSound thanks!
Yes, the theme color API endpoint sounds cool and I can implement that feature easily! (it still is a plus though, do it only if it doesn't take you too much time :) )

@mmazzarolo You can also see progress on getting queue and playlist handling methods over at this issue

https://github.com/gmusic-utils/gmusic.js/issues/36

I'm going to close this as the initial change methods that were missing are now implemented. The playlist API endpoints can be tracked upstream and gmusic-utils

Was this page helpful?
0 / 5 - 0 ratings