diff --git a/zspotify/const.py b/zspotify/const.py index 1ec7594a..73c5e9c1 100644 --- a/zspotify/const.py +++ b/zspotify/const.py @@ -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' diff --git a/zspotify/zspotify.py b/zspotify/zspotify.py index 5739dfa5..7d934454 100644 --- a/zspotify/zspotify.py +++ b/zspotify/zspotify.py @@ -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):