Closed StijnOostdam closed 4 years ago
2020-03-18 07:56:48.8462|WARN|Winleafs.Wpf.Api.Events.SpotifyEventTrigger|Retrieving the Spotify current playlist failed.
System.ArgumentException: An item with the same key has already been added. Key: System.Net.Http.Headers.HeaderDescriptor
at System.Collections.Generic.Dictionary`2.TryInsert(TKey key, TValue value, InsertionBehavior behavior)
at System.Collections.Generic.Dictionary`2.Add(TKey key, TValue value)
at System.Net.Http.Headers.HttpHeaders.GetOrCreateHeaderInfo(HeaderDescriptor descriptor, Boolean parseRawValues)
at SpotifyAPI.Web.SpotifyWebClient.AddHeaders(Dictionary`2 headers)
at SpotifyAPI.Web.SpotifyWebClient.DownloadRawAsync(String url, Dictionary`2 headers)
at SpotifyAPI.Web.SpotifyWebClient.DownloadAsync(String url, Dictionary`2 headers)
at SpotifyAPI.Web.SpotifyWebClient.DownloadJsonAsync[T](String url, Dictionary`2 headers)
at SpotifyAPI.Web.SpotifyWebAPI.DownloadDataAsync[T](String url)
at Winleafs.Wpf.Helpers.Spotify.GetCurrentPlayingPlaylist() in Winleafs\Winleafs.Wpf\Helpers\Spotify.cs:line 63
at Winleafs.Wpf.Api.Events.SpotifyEventTrigger.CheckPlaylistAsync() in Winleafs\Winleafs.Wpf\Api\Events\SpotifyEventTrigger.cs:line 54
Exception fixed, I want to add a message on startup whether the spotify client is connected or not.
EDIT: done
Have a dropdown that contains the playlists that the user has instead of putting in the name.
Also should add a message saying that it is only available to premium Spotify users due to API limitations
Access token only seems valid for a few hours
Please also test the functionality very carefully