dsafa/audio-band

Spotify integration

stefanw1337 opened this issue · 3 comments

Describe the bug
Once I put in the spotify client ID and secret, gives me error. See screenshot.

Checked common issues

  • Unblocked the files. (Windows blocks files when installing / upgrading for some people)
  • Double checked audio source specific issues (for audio source related issues)

To Reproduce
Steps to reproduce the behavior:

  1. Open Audio Band settings
  2. Go to Spotify (in the settings).
  3. Create spotify client ID and secret on the spotify website.
  4. Fill inn spotify ID and secret in the Spotify settings of Audio band.
  5. Hit Apply.
  6. Get error when Spotify wants to authorize the app.

Expected behavior
Expected Audio Band to get info from Spotify about the current playing song, and let it control the music with the buttons.

Screenshots
https://i.imgur.com/B3oqJ9H.jpg

Version Info
Microsoft Windows [Version 10.0.18363.752]
AudioBand-v0.9.4

Logs attachment
2020-04-04 02:50:09.4398|INFO|AudioBand|Starting AudioBand. Version: "v0.9.4", OS: Microsoft Windows NT 10.0.18363.0
2020-04-04 02:50:11.9525|DEBUG|AudioBand.UI.AudioBandToolbarViewModel|Loading audio sources
2020-04-04 02:50:11.9525|DEBUG|AudioBand.AudioSource.AudioSourceManager|Loading audio sources in "C:\Program Files\AudioBand\AudioSources"
2020-04-04 02:50:12.5436|DEBUG|AudioSourceWrapper(spotify)|Initializing wrapper
2020-04-04 02:50:12.6160|DEBUG|AudioSourceHost.AudioSourceLoader|Probing path "C:\Program Files\AudioBand\AudioSources\spotify" for audio source
2020-04-04 02:50:12.8103|DEBUG|AudioSourceHost.AudioSourceLoader|Loading audio source from path "C:\Program Files\AudioBand\AudioSources\spotify\SpotifyAudioSource.dll"
2020-04-04 02:50:13.0827|DEBUG|AudioSourceWrapper(spotify)|Wrapper initialization complete
2020-04-04 02:50:13.1621|DEBUG|AudioBand.UI.AudioBandToolbarViewModel|Activating new audio source "Spotify"
2020-04-04 02:50:13.1701|DEBUG|AudioBand.UI.AudioBandToolbarViewModel|Audio sources loaded. Loaded 1 sources
2020-04-04 12:32:23.8293|DEBUG|AudioBand.UI.TemplateSelectors.AudioSourceSettingSelector|Selecting value template for setting "Spotify Client ID", type System.String
2020-04-04 12:32:23.8435|DEBUG|AudioBand.UI.TemplateSelectors.AudioSourceSettingSelector|Selecting value template for setting "Spotify Client secret", type System.String
2020-04-04 12:32:23.8435|DEBUG|AudioBand.UI.TemplateSelectors.AudioSourceSettingSelector|Selecting value template for setting "Callback Port", type System.UInt32
2020-04-04 12:32:23.8575|DEBUG|AudioBand.UI.AudioSourceSettingKeyValue|Starting edit
2020-04-04 12:32:23.8575|DEBUG|AudioBand.UI.AudioSourceSettingsCollectionViewModel|Starting edit
2020-04-04 12:32:23.8704|DEBUG|AudioBand.UI.TemplateSelectors.AudioSourceSettingSelector|Selecting value template for setting "Proxy Host", type System.String
2020-04-04 12:32:23.8704|DEBUG|AudioBand.UI.TemplateSelectors.AudioSourceSettingSelector|Selecting value template for setting "Proxy Password", type System.String
2020-04-04 12:32:23.8904|DEBUG|AudioBand.UI.TemplateSelectors.AudioSourceSettingSelector|Selecting value template for setting "Proxy Port", type System.UInt32
2020-04-04 12:32:23.8904|DEBUG|AudioBand.UI.AudioSourceSettingKeyValue|Starting edit
2020-04-04 12:32:23.9014|DEBUG|AudioBand.UI.TemplateSelectors.AudioSourceSettingSelector|Selecting value template for setting "Proxy Username", type System.String
2020-04-04 12:32:23.9014|DEBUG|AudioBand.UI.TemplateSelectors.AudioSourceSettingSelector|Selecting value template for setting "Use Proxy", type System.Boolean
2020-04-04 12:33:22.5441|DEBUG|AudioBand.UI.AudioSourceSettingKeyValue|Starting edit
2020-04-04 12:33:24.0749|DEBUG|AudioBand.UI.AudioSourceSettingKeyValue|Starting edit
2020-04-04 12:33:24.1915|DEBUG|AudioBand.UI.AudioSourceSettingsCollectionViewModel|Ending edit
2020-04-04 12:33:24.1915|DEBUG|AudioBand.UI.AudioSourceSettingKeyValue|Ending edit
2020-04-04 12:33:24.1915|DEBUG|AudioBand.UI.AudioSourceSettingKeyValue|Ending edit
2020-04-04 12:33:24.1915|DEBUG|AudioBand.UI.AudioSourceSettingKeyValue|Ending edit
2020-04-04 12:33:24.1915|DEBUG|AudioBand.UI.AudioSourceSettingKeyValue|Ending edit
2020-04-04 12:33:24.1935|DEBUG|AudioSource(Spotify)|Connecting to spotify
2020-04-04 12:34:45.7867|WARN|AudioSource(Spotify)|Error with player command [SetRepeatModeAsync]: Code = '400', Message = 'Only valid bearer authentication supported'
2020-04-04 12:34:46.7612|WARN|AudioSource(Spotify)|Error with player command [SetRepeatModeAsync]: Code = '400', Message = 'Only valid bearer authentication supported'
2020-04-04 12:34:48.0220|WARN|AudioSource(Spotify)|Error with player command [SetShuffleAsync]: Code = '400', Message = 'Only valid bearer authentication supported'
2020-04-04 12:34:48.7193|WARN|AudioSource(Spotify)|Error with player command [SetShuffleAsync]: Code = '400', Message = 'Only valid bearer authentication supported'
2020-04-04 12:34:57.7525|INFO|AudioBand|Starting AudioBand. Version: "v0.9.4", OS: Microsoft Windows NT 10.0.18363.0
2020-04-04 12:34:57.9782|DEBUG|AudioBand.UI.AudioBandToolbarViewModel|Loading audio sources
2020-04-04 12:34:57.9782|DEBUG|AudioBand.AudioSource.AudioSourceManager|Loading audio sources in "C:\Program Files\AudioBand\AudioSources"
2020-04-04 12:34:58.3190|DEBUG|AudioSourceWrapper(spotify)|Initializing wrapper
2020-04-04 12:34:58.3839|DEBUG|AudioSourceHost.AudioSourceLoader|Probing path "C:\Program Files\AudioBand\AudioSources\spotify" for audio source
2020-04-04 12:34:58.5570|DEBUG|AudioSourceHost.AudioSourceLoader|Loading audio source from path "C:\Program Files\AudioBand\AudioSources\spotify\SpotifyAudioSource.dll"
2020-04-04 12:34:58.7114|DEBUG|AudioSourceWrapper(spotify)|Wrapper initialization complete
2020-04-04 12:34:58.7471|DEBUG|AudioBand.UI.AudioBandToolbarViewModel|Activating new audio source "Spotify"
2020-04-04 12:34:58.7491|DEBUG|AudioSource(Spotify)|Connecting to spotify
2020-04-04 12:34:58.8844|DEBUG|AudioBand.UI.AudioBandToolbarViewModel|Audio sources loaded. Loaded 1 sources

Additional context
Link of the URL it tries to authorize with(without the ID):
https://accounts.spotify.com/authorize/?client_id=(spotify client ID here)&response_type=code&redirect_uri=http://localhost:80&state=2bf31225&scope=user-read-playback-state%20user-modify-playback-state%20user-read-currently-playing&show_dialog=False

Added http://localhost:80 there, and it seem to work(asks me to authorize). It will now open browser whenever I disable/enable the widget. But it still doesn't work.

Again I've followed this:
https://dsafa.github.io/audio-band/audioband/audiosources/spotify.html

But it just opens my default browser on the last page I was on. That's all it does.

Today it suddenly started working for some reason. I didn't even have Spotify on my PC opened at the time, just on my phone. So the buttons didn't work, but now when Spotify is opened it does work, excellent.