dkgv / pinpoint

Keystroke launcher and personal command central. Alternative to Spotlight and Alfred for Windows. Alternative to Wox, PowerToys.
https://usepinpoint.com
GNU General Public License v3.0
155 stars 17 forks source link

Fix bug in Spotify plugin, reset "showing options" variable when selecting a result. #58

Closed clawcastle closed 3 years ago

clawcastle commented 3 years ago

Initially I had thought it would make sense to set the refresh token to null if token exchange failed. However, sometimes pinpoint would send two requests to Spotify with the same old access token, triggering two token exchanges. The second exchange would fail as Spotify invalidates the refresh token on each exchange, and the refresh token in settings would be set to null. Also added a bit more error handling for parsing JSON results just to be safe.