mirror of
https://github.com/Sarsoo/Spotify.NET.git
synced 2024-12-24 23:16:28 +00:00
Added 3 compilebreakers on Todo Items
This commit is contained in:
parent
d3b6913690
commit
a913f1d459
@ -638,6 +638,7 @@ namespace SpotifyAPI.Web
|
|||||||
if (!UseAuth)
|
if (!UseAuth)
|
||||||
throw new InvalidOperationException("Auth is required for IsFollowing");
|
throw new InvalidOperationException("Auth is required for IsFollowing");
|
||||||
JToken res = DownloadDataAsync<JToken>(_builder.IsFollowing(followType, ids));
|
JToken res = DownloadDataAsync<JToken>(_builder.IsFollowing(followType, ids));
|
||||||
|
# Compilebreaker
|
||||||
if (res is JArray) //todo expression is always false
|
if (res is JArray) //todo expression is always false
|
||||||
return Task.FromResult(new ListResponse<Boolean> { List = res.ToObject<List<Boolean>>(), Error = null });
|
return Task.FromResult(new ListResponse<Boolean> { List = res.ToObject<List<Boolean>>(), Error = null });
|
||||||
return Task.FromResult(new ListResponse<Boolean> { List = null, Error = res["error"].ToObject<Error>() });
|
return Task.FromResult(new ListResponse<Boolean> { List = null, Error = res["error"].ToObject<Error>() });
|
||||||
@ -768,6 +769,7 @@ namespace SpotifyAPI.Web
|
|||||||
if (!UseAuth)
|
if (!UseAuth)
|
||||||
throw new InvalidOperationException("Auth is required for IsFollowingPlaylist");
|
throw new InvalidOperationException("Auth is required for IsFollowingPlaylist");
|
||||||
JToken res = DownloadDataAsync<JToken>(_builder.IsFollowingPlaylist(ownerId, playlistId, ids));
|
JToken res = DownloadDataAsync<JToken>(_builder.IsFollowingPlaylist(ownerId, playlistId, ids));
|
||||||
|
# Compilebreaker
|
||||||
if (res is JArray) //todo expression is always false
|
if (res is JArray) //todo expression is always false
|
||||||
return Task.FromResult(new ListResponse<Boolean> { List = res.ToObject<List<Boolean>>(), Error = null });
|
return Task.FromResult(new ListResponse<Boolean> { List = res.ToObject<List<Boolean>>(), Error = null });
|
||||||
return Task.FromResult(new ListResponse<Boolean> { List = null, Error = res["error"].ToObject<Error>() });
|
return Task.FromResult(new ListResponse<Boolean> { List = null, Error = res["error"].ToObject<Error>() });
|
||||||
@ -930,6 +932,7 @@ namespace SpotifyAPI.Web
|
|||||||
if (!UseAuth)
|
if (!UseAuth)
|
||||||
throw new InvalidOperationException("Auth is required for CheckSavedTracks");
|
throw new InvalidOperationException("Auth is required for CheckSavedTracks");
|
||||||
JToken res = DownloadDataAsync<JToken>(_builder.CheckSavedTracks(ids));
|
JToken res = DownloadDataAsync<JToken>(_builder.CheckSavedTracks(ids));
|
||||||
|
# Compilebreaker
|
||||||
if (res is JArray) //todo expression is always false
|
if (res is JArray) //todo expression is always false
|
||||||
return Task.FromResult(new ListResponse<Boolean> { List = res.ToObject<List<Boolean>>(), Error = null });
|
return Task.FromResult(new ListResponse<Boolean> { List = res.ToObject<List<Boolean>>(), Error = null });
|
||||||
return Task.FromResult(new ListResponse<Boolean> { List = null, Error = res["error"].ToObject<Error>() });
|
return Task.FromResult(new ListResponse<Boolean> { List = null, Error = res["error"].ToObject<Error>() });
|
||||||
|
Loading…
Reference in New Issue
Block a user