swdotcom / swdc-vscode-musictime

A VS Code extension to discover the most productive music to listen to as you code
https://www.software.com/music-time
Apache License 2.0
560 stars 22 forks source link

Player only plays 1 second before stopping #59

Closed jgclark closed 3 years ago

jgclark commented 3 years ago

Upgraded to v2.1.16 but things still aren't quite right on macOS 10.15.7. Clicking play brings up a 'choose a player to launch' dialog every time. I select Desktop Player, and it finds the running instance OK, and starts playing. But every time it stops after just a second. Even after a restart of both VSCode and Spotify.

xavluiz commented 3 years ago

I see, I'll take a look at this, and thank you for the update.

xavluiz commented 3 years ago

Hi Jonathan, thank you for bringing this up. I did find a pause function that shouldn't have been in that path. I've also cleaned up unused logic and some general efficiency updates in v2.1.20. Let me know how this works out for you. I've been able to test it on my MacOs and launch the desktop and have it start playing right away, but always happy to continue to find and fix the play control flow. Thanks!

jgclark commented 3 years ago

OK, 2.0.20 now plays without pausing. However ... the little buttons in the bottom bar don't work at all after that. If I stop the music playing in Spotify manually, the plugin doesn't change the stop button to play. And when I click on it, it then opens up the same "choose player" dialog as before.

xavluiz commented 3 years ago

Ok, I'll look at this right away, thank you.

xavluiz commented 3 years ago

Hi Jonathan. I've tested the status bar buttons and they seem to work for me but I will look into this further today. In regards to changing the song state manually in Spotify, this is a known issue. We are rate limited by Spotify so we're unable to poll for the song status to help display the latest status bar state info. There is a hearbeat icon next to the like icon that will allow you to see the current status of the song.