[db] Functions to read/store int in the admin table and introduce

constants for admin table keys
This commit is contained in:
chme
2017-11-19 07:46:28 +01:00
committed by ejurgensen
parent 5315bdf83e
commit 38ab4b9676
6 changed files with 57 additions and 68 deletions

View File

@@ -642,7 +642,7 @@ tokens_get(struct keyval *kv, const char **err)
token_requested = time(NULL);
if (spotify_refresh_token)
db_admin_set("spotify_refresh_token", spotify_refresh_token);
db_admin_set(ADMIN_SPOTIFY_REFRESH_TOKEN, spotify_refresh_token);
request_user_info();
@@ -701,7 +701,7 @@ spotifywebapi_token_refresh(char **user)
return 0;
}
refresh_token = db_admin_get("spotify_refresh_token");
refresh_token = db_admin_get(ADMIN_SPOTIFY_REFRESH_TOKEN);
if (!refresh_token)
{
DPRINTF(E_LOG, L_SPOTIFY, "No spotify refresh token found\n");