Google-Play-Music-Desktop-Player-UNOFFICIAL-
Google-Play-Music-Desktop-Player-UNOFFICIAL- copied to clipboard
Updates and Fixes issues with Discord Rich Presences
My system and some pre information
Note I've had to disable the pre-commit as it simply would not run no matter what the debugging I tried on it
But info:
node -v
: v8.15.0
npm -v
: v6.4.1
This was Tested on a Win10 64x (1903)
npm run lint
has been ran, and no errors returned.
Fixes:
Possible fix to #2969 This issue seemed to be caused by a dead RPC connection when Discord wasn't open, still trying to send requests to it. This is fixed by using a Connected / Disconnected varaible which prevents from sending requests to nothing. This is not verified as I was not experiancing the issue before, but from my testing of a few hours on my PC, (On and Off Discord) My RAM never really exceeded much 300MBs.
Fixes #3266 This is fixed by using my own Discord application instead of the currently used one. I've previously requested to join the existing Application but haven't got a reply. I have this one setup for teams already, and willing to add people if I'm provided with a Discord username + Discrim. (Discord only supports Full Admin at the moment so it will be restricted to main Contributers, People who have got previously approve Discord RPC work)
Fixes #3404 This will currently try to reconnect to the client on a State change but the Event listeners on Google Play Music might get moved around.
Explaination stuff...
Looking through the Basic Discord-rich-presences library used before, there was no event triggered for disconnecting from client. This is why I have instead replace it with the native discord-rpc library instead of the wrapper library originally used, for better control over the RPC + all of the events including the Disconnect.
Added features
I've also added an additional feature of showing a Heart icon on songs which are liked.
Testing
Sadly this can't have a testing Library but I will create YouTube Video including a showing example of it all working!
Crappy YouTube Video showing "stuff"
Edit: Been rolling with this as my Daily driver for my Google Play Music, and a friend of mine has been using the prebuilt version for their daily driver for a few weeks, with no issues towards it showing up incorrectly.
Discussion
One thing that probably needs a bit more questioning would be the usage of the Application's event listeners and for when to check for a connection for Discord.
Thank you.
can we get these changes merged? i would love to have presence working again
@MarshallOfSound Can this be merged? It's getting pretty old... 🤔