From 32913bac2cd70c4352837545dbc72f41b6a6b25e Mon Sep 17 00:00:00 2001 From: David Rudie Date: Wed, 20 Jan 2016 19:37:44 -0600 Subject: [PATCH] Album Artwork Fix This fixes artwork links not working with Spotify's new API. --- Snip/Players/Spotify.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Snip/Players/Spotify.cs b/Snip/Players/Spotify.cs index a75ac93..ef3f779 100644 --- a/Snip/Players/Spotify.cs +++ b/Snip/Players/Spotify.cs @@ -201,6 +201,7 @@ private void DownloadJson(string spotifyTitle) } } + // TODO: Re-write this to download the artwork link supplied in the primary JSON file instead of using the old embedded web link. private void HandleSpotifyAlbumArtwork(string songTitle) { string albumId = string.Empty; @@ -213,7 +214,7 @@ private void HandleSpotifyAlbumArtwork(string songTitle) if (jsonSummary != null) { - jsonSummary = SimpleJson.DeserializeObject(jsonSummary["tracks"].ToString()); + jsonSummary = SimpleJson.DeserializeObject(jsonSummary.tracks["items"].ToString()); foreach (dynamic jsonTrack in jsonSummary) { @@ -223,7 +224,7 @@ private void HandleSpotifyAlbumArtwork(string songTitle) if (foundTitle == modifiedTitle) { dynamic jsonAlbum = SimpleJson.DeserializeObject(jsonTrack["album"].ToString()); - albumId = jsonAlbum.href.ToString(); + albumId = jsonAlbum.uri.ToString(); break; }