oja / amazon-music-linux

linux desktop player for amazon music
Mozilla Public License 2.0
46 stars 16 forks source link

adding playing song to the title #5

Closed flokol120 closed 6 years ago

flokol120 commented 6 years ago

injecting JS into Amazon music to get Song title, artist, playlist added various event listener to the webview outsourced the App name

Sorry for yet another pull request, but this is acutally pretty cool. It is not working all the time, because amazon music is a bit slow changing the title, maybe some kind of timeout would be appropriate and can be added in the future. I know it's a bit hacky overall but it's the best it can get using electron's webview.

flokol120 commented 6 years ago

Edit: The 'injector' already has a function called pauseMusic to (surprise, surprise) pause the music (and actually unpause it again). This way the media keys can be also implemented pretty easy.

oja commented 6 years ago

@flokol120 Thank you very much for all this. When I get the chance I will rebuild the app with your changes and post the new binaries.