Google Play Music Desktop Player Plugin. Includes media controls

Share your custom plugins and applications to enhance Rainmeter.
User avatar

Google Play Music Desktop Player Plugin. Includes media controls

February 5th, 2017, 5:49 am
tjhrulz
   [22 posts]

So I finished documenting everything so I figured I would release the plugin on here.
Basically this plugin adds every feature available in NowPlaying (Except genre, year, and track #) to GPMDP, as well as a few extra info types. Supports the standard array of bangs.

You are free to redistribute my plugin with your skins.
The only hiccup is that the user need to enter a 4 digit pin into rainmeter in order to be able to use controls. However I store the permanent authcode in the rainmeter.data file so they only need to do it once.
I include in my installer an authorization skin however though that you are free to include in your skin with the .dll files. that guides the user through this and includes a link to the troubleshooting FAQ on my wiki. If you monitor PlayerInfo status in your skin when status is 1 then there is no remote access and you can just active that skin and deactivate it once status is 2.

The documentation and code is all available on my github but to break down the types quickly for you here.

Updated to version 1.2
Planned for next version: Performance improvements and bang to support going to a specific place in the queue. Possibly make the queue length dynamic

Changelog:
Feb, 8, 2017
Now supports a queue of last 10 songs and next 10 songs
Small memory enhancements

Feb, 7, 2017
Performance enhancements
Cover now has a fallback store location and if GPMDP is closed will point to the default cover location.

Feb, 6, 2017
Values now reset to default values on GPMDP close
Position and duration now have default values of 00:00
Fixed a memory leak that would happen if GPMDP was closed.


All of these are defined with PlayerInfo=

Title - String
Artist - String
Album - String
Cover - Path
    Attributes:
    DefaultPath - Path (Value of the measure when album art is still downloading)
    CoverPath - Path (Value of the measure when album art is done downloading, where album art is downloaded to)
CoverWebAddress - String
Position - String
Duration - String
Progress - Percent (Double) MaxValue: 100
Repeat - 0, 1 or 2
Shuffle - 0 or 1
Rating -1, 0, or 1
Volume - Percent (Integer) MaxValue: 100
Lyrics - String (Null while loading lyrics)
Queue - List
    Attributes:
    QueueLocation - Integer >= -10 and <= 10 (Location of song to read from queue relative of current, i.e the song two songs ago is QueueLocation=-2)
    QueueType - String [Title, Artist, Album, AlbumArt, Duration, PlayCount, or Index](Note AlbumArt returns a URL)
ThemeType - 0 for light, 1 for dark
ThemeColor - Comma Seperated RGB Value
State - 0, 1, 2
Status - -1, 0, 1, 2

As for supported bangs
SetPosition ### (Where ### is a number between 0-100, can be relative by adding + or - to beginning)
SetVolume ### (Where ### is a number between 0-100, can be relative by adding + or - to beginning)
Previous
PlayPause
Next
Repeat
Shuffle
ToggleThumbsUp
ToggleThumbsDown
SetRating # (Where # is -1 for thumbs down, 0 for no rating, 1 for thumbs up)
keycode #### (Where #### is the 4 digit integer from GPMDP used to grant remote access for the bangs to work)

Link to github: https://github.com/tjhrulz/GPMDP-Plugin
Link to latest release: https://github.com/tjhrulz/GPMDP-Plugin/releases/tag/1.2.0
Attachments
GPMDP Plugin_1.2.0.rmskin
(1.3 MiB) Downloaded 122 times
Last edited by tjhrulz on April 20th, 2017, 9:24 pm, edited 4 times in total.
User avatar

Re: Google Play Music Desktop Player Plugin. Includes media controls

February 5th, 2017, 8:21 pm
MarcoPixel
   [21 posts]

Cool stuff, works great and no issues!

It's also really easy to implement, it's similar to NowPlaying.
User avatar

Re: Google Play Music Desktop Player Plugin. Includes media controls

February 7th, 2017, 1:30 am
tjhrulz
   [22 posts]

I have updated the plugin to address a memory leak as well as tweak how a few variables are handled internally for better consistency. I plan to further tweak a few variables as well as increase performance as in order to fix that memory leak the plugin has to do a process search on a somewhat regular basis (The plugin still normally sits a 0.0% usage but when GPMDP is closed I have seen it spike up to 0.3% on my i5).

Edit: Updated now to 1.1.2, CPU usage back down to <0.0% when GPMDP is closed.
User avatar

Re: Google Play Music Desktop Player Plugin. Includes media controls

February 9th, 2017, 1:45 am
tjhrulz
   [22 posts]

I have also now added support for accessing the queue from GPMDP.

So for example:

Code: Select all

[MeasureNextSongTitle]
Measure=Plugin
Plugin=GPMDPPlugin
PlayerInfo=Queue
QueueLocation=1
QueueType=Title

Will get the title of the next song. You can get up to 10 songs in the past and 10 songs in the future (As well as the current song) and can get Title, Artist, Album, AlbumArt, Duration, PlayCount, and Index. Note AlbumArt is for the time being just the URL of the album art, and index is the index in the overall queue for GPMDP. Also note that all info will the blank ("") if there is not a song in that location in the queue, so feel free to as a substitute like Substitute="":"N/A"

In the future it will have an album art downloader as well as I hope to make its length expand based on need so you can get as many songs as you want into the past or future.
User avatar

Re: Google Play Music Desktop Player Plugin. Includes media controls

February 9th, 2017, 3:22 am
jsmorley
Developer   [15498 posts]

Google Play Music has a lot going for it. It's busy uploading my 6,000 or so songs on my PC to the cloud now, and then I'll give it a real go. Nice to be able to get at my entire music collection from any device, anywhere.

Once I get the hang of the site and various apps, I'll give the plugin a go in Rainmeter and see how that is...

Thanks for sharing this with the community.
User avatar

Re: Google Play Music Desktop Player Plugin. Includes media controls

April 20th, 2017, 8:59 pm
tjhrulz
   [22 posts]

I just realized I never added to the documentation how to use the queue, I am adding that now.

Return to “Plugins & Addons”



Who is online

Users browsing this forum: No registered users and 4 guests