From 6e5268879fb77faa1b3c5283187ee231c9d68c4c Mon Sep 17 00:00:00 2001 From: Philipp Nanz Date: Tue, 5 Feb 2019 07:41:01 +0100 Subject: [PATCH] Update refreshToken when new one is supplied --- NowPlayingKiosk/SpotifyNowPlayingTrackInfoProvider.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/NowPlayingKiosk/SpotifyNowPlayingTrackInfoProvider.cs b/NowPlayingKiosk/SpotifyNowPlayingTrackInfoProvider.cs index 825fbbc..0c3327d 100644 --- a/NowPlayingKiosk/SpotifyNowPlayingTrackInfoProvider.cs +++ b/NowPlayingKiosk/SpotifyNowPlayingTrackInfoProvider.cs @@ -28,6 +28,10 @@ public TrackInfo WhatIsNowPlaying() { accessToken = authorization.RefreshToken(refreshToken.RefreshToken).Result; webApi.AccessToken = accessToken.AccessToken; + if (accessToken.RefreshToken != null) + { + refreshToken = accessToken; + } } PlaybackContext context = webApi.GetPlayingTrack();