Skip to content

Commit

Permalink
[spotify] Fix some logging inaccuracies
Browse files Browse the repository at this point in the history
  • Loading branch information
ejurgensen committed Apr 5, 2024
1 parent a8342dc commit 1c17231
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/library/spotify_webapi.c
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ request_access_tokens(struct spotify_credentials *credentials, struct keyval *kv
}

/*
* Request the api endpoint at 'href' and retuns the response body as
* Request the api endpoint at 'href' and returns the response body as
* an allocated JSON object (must be freed by the caller) or NULL.
*
* @param href The spotify endpoint uri
Expand Down Expand Up @@ -369,7 +369,7 @@ request_endpoint(const char *uri, const char *access_token)
goto out;
}

DPRINTF(E_DBG, L_SPOTIFY, "Request Spotify API endpoint: '%s')\n", uri);
DPRINTF(E_DBG, L_SPOTIFY, "Making request to '%s'\n", uri);

CHECK_ERR(L_SPOTIFY, pthread_mutex_lock(&spotify_http_session.lock));
ret = http_client_request(ctx, &spotify_http_session.session);
Expand All @@ -396,7 +396,7 @@ request_endpoint(const char *uri, const char *access_token)
if (!json_response)
DPRINTF(E_LOG, L_SPOTIFY, "JSON parser returned an error for '%s'\n", uri);
else
DPRINTF(E_DBG, L_SPOTIFY, "Spotify API endpoint request: '%s'\n", uri);
DPRINTF(E_DBG, L_SPOTIFY, "Got JSON response for request to '%s'\n", uri);

out:
free_http_client_ctx(ctx);
Expand Down Expand Up @@ -648,7 +648,7 @@ request_pagingobject_endpoint(const char *href, paging_item_cb item_cb, paging_r
ret = item_cb(item, (i + offset), total, request_type, arg, credentials);
if (ret < 0)
{
DPRINTF(E_LOG, L_SPOTIFY, "Unexpected JSON: error processing item at index %d '%s' (API endpoint: '%s')\n",
DPRINTF(E_LOG, L_SPOTIFY, "Couldn't add item at index %d '%s' (API endpoint: '%s')\n",
i, json_object_to_json_string(item), href);
}
}
Expand Down

0 comments on commit 1c17231

Please sign in to comment.