diff --git a/AUTHORS.md b/AUTHORS.md index 4293b0bd..b1a4f753 100644 --- a/AUTHORS.md +++ b/AUTHORS.md @@ -10,4 +10,5 @@ Contributors - [ConorIA](https://github.com/ConorIA) - [ZeroDot1](http://basic1.moy.su/) - [Lukas Kolletzki](https://github.com/kolletzki) -- [Mahmoud Hossam](https://github.com/mahmoudhossam) \ No newline at end of file +- [Mahmoud Hossam](https://github.com/mahmoudhossam) +- [Terin Stock](https://github.com/terinjokes) diff --git a/plugins/googleplaymusic/integration.js b/plugins/googleplaymusic/integration.js index 05b93a01..42767369 100644 --- a/plugins/googleplaymusic/integration.js +++ b/plugins/googleplaymusic/integration.js @@ -32,11 +32,14 @@ function getButtons() { // Much of this was adapted from: https://github.com/tiliado/nuvola-app-google-play-music //----------------------------------------------------------------------------- function update() { - var controlClassName = document.querySelector("#player div.material-player-middle").children[3].className; - var playbackStatus = mellowplayer.PlaybackStatus.STOPPED; - if (controlClassName === "x-scope paper-icon-button-0 playing") + var pp = getButtons().playpause; + var playbackStatus; + + if (pp.disabled) + playbackStatus = mellowplayer.PlaybackStatus.STOPPED; + else if (pp.className.indexOf("playing") != -1) playbackStatus = mellowplayer.PlaybackStatus.PLAYING; - else if (controlClassName === "x-scope paper-icon-button-0") + else playbackStatus = mellowplayer.PlaybackStatus.PAUSED; var elm;