mirror of
https://github.com/THIS-IS-NOT-A-BACKUP/zspotify.git
synced 2024-12-02 04:23:57 +01:00
Merge pull request #159 from yiannisha/fix#154
Added 'user-library-read' token for saved tracks fixes#154
This commit is contained in:
commit
983fd79877
@ -72,6 +72,8 @@ USER_READ_EMAIL = 'user-read-email'
|
|||||||
|
|
||||||
PLAYLIST_READ_PRIVATE = 'playlist-read-private'
|
PLAYLIST_READ_PRIVATE = 'playlist-read-private'
|
||||||
|
|
||||||
|
USER_LIBRARY_READ = 'user-library-read'
|
||||||
|
|
||||||
WINDOWS_SYSTEM = 'Windows'
|
WINDOWS_SYSTEM = 'Windows'
|
||||||
|
|
||||||
CREDENTIALS_JSON = 'credentials.json'
|
CREDENTIALS_JSON = 'credentials.json'
|
||||||
|
@ -18,7 +18,7 @@ from librespot.core import Session
|
|||||||
|
|
||||||
from const import CREDENTIALS_JSON, TYPE, \
|
from const import CREDENTIALS_JSON, TYPE, \
|
||||||
PREMIUM, USER_READ_EMAIL, AUTHORIZATION, OFFSET, LIMIT, CONFIG_FILE_PATH, FORCE_PREMIUM, \
|
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
|
from utils import MusicFormat
|
||||||
|
|
||||||
|
|
||||||
@ -74,7 +74,7 @@ class ZSpotify:
|
|||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def __get_auth_token(cls):
|
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
|
@classmethod
|
||||||
def get_auth_header(cls):
|
def get_auth_header(cls):
|
||||||
|
Loading…
Reference in New Issue
Block a user