mirror of
https://github.com/owntone/owntone-server.git
synced 2025-04-15 08:45:54 -04:00
[artwork] Don't log Spotify artwork errors if user is not logged in
Ref issue #986
This commit is contained in:
parent
07158cf2d5
commit
86d49a7028
@ -1647,21 +1647,26 @@ source_item_spotifywebapi_track_get(struct artwork_ctx *ctx)
|
|||||||
static int
|
static int
|
||||||
source_item_spotifywebapi_search_get(struct artwork_ctx *ctx)
|
source_item_spotifywebapi_search_get(struct artwork_ctx *ctx)
|
||||||
{
|
{
|
||||||
struct spotifywebapi_access_token info;
|
struct spotifywebapi_status_info webapi_info;
|
||||||
|
struct spotifywebapi_access_token webapi_token;
|
||||||
char *url;
|
char *url;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
if (!online_source_is_enabled(&spotify_source))
|
if (!online_source_is_enabled(&spotify_source))
|
||||||
return ART_E_NONE;
|
return ART_E_NONE;
|
||||||
|
|
||||||
spotifywebapi_access_token_get(&info);
|
spotifywebapi_status_info_get(&webapi_info);
|
||||||
if (!info.token)
|
if (!webapi_info.token_valid)
|
||||||
|
return ART_E_NONE; // Not logged in
|
||||||
|
|
||||||
|
spotifywebapi_access_token_get(&webapi_token);
|
||||||
|
if (!webapi_token.token)
|
||||||
return ART_E_ERROR;
|
return ART_E_ERROR;
|
||||||
|
|
||||||
spotify_source.auth_secret = info.token;
|
spotify_source.auth_secret = webapi_token.token;
|
||||||
|
|
||||||
url = online_source_search(&spotify_source, ctx);
|
url = online_source_search(&spotify_source, ctx);
|
||||||
free(info.token);
|
free(webapi_token.token);
|
||||||
if (!url)
|
if (!url)
|
||||||
return ART_E_NONE;
|
return ART_E_NONE;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user