Added 'user-library-read' token for saved tracks fixes#154

This commit is contained in:
yiannisha 2021-10-27 22:23:40 +03:00
parent 68cea35fde
commit 8ff7c07ccf
2 changed files with 4 additions and 2 deletions

View File

@ -72,6 +72,8 @@ USER_READ_EMAIL = 'user-read-email'
PLAYLIST_READ_PRIVATE = 'playlist-read-private'
USER_LIBRARY_READ = 'user-library-read'
WINDOWS_SYSTEM = 'Windows'
CREDENTIALS_JSON = 'credentials.json'

View File

@ -18,7 +18,7 @@ from librespot.core import Session
from const import CREDENTIALS_JSON, TYPE, \
PREMIUM, USER_READ_EMAIL, AUTHORIZATION, OFFSET, LIMIT, CONFIG_FILE_PATH, FORCE_PREMIUM, \
PLAYLIST_READ_PRIVATE, CONFIG_DEFAULT_SETTINGS
PLAYLIST_READ_PRIVATE, USER_LIBRARY_READ, CONFIG_DEFAULT_SETTINGS
from utils import MusicFormat
@ -74,7 +74,7 @@ class ZSpotify:
@classmethod
def __get_auth_token(cls):
return cls.SESSION.tokens().get_token(USER_READ_EMAIL, PLAYLIST_READ_PRIVATE).access_token
return cls.SESSION.tokens().get_token(USER_READ_EMAIL, PLAYLIST_READ_PRIVATE, USER_LIBRARY_READ).access_token
@classmethod
def get_auth_header(cls):