mirror of
https://zotify.xyz/zotify/zotify.git
synced 2024-11-10 01:02:06 +01:00
add scope for followed artists
This commit is contained in:
parent
4bf43efe78
commit
91f24a81f2
5 changed files with 12 additions and 4 deletions
|
@ -1,5 +1,9 @@
|
||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
## 0.6.11
|
||||||
|
- Add new scope for reading followed artists
|
||||||
|
- Print API errors by default
|
||||||
|
|
||||||
## 0.6.10
|
## 0.6.10
|
||||||
- Fix cover art size once and for all
|
- Fix cover art size once and for all
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
[metadata]
|
[metadata]
|
||||||
name = zotify
|
name = zotify
|
||||||
version = 0.6.10
|
version = 0.6.11
|
||||||
author = Zotify Contributors
|
author = Zotify Contributors
|
||||||
description = A highly customizable music and podcast downloader
|
description = A highly customizable music and podcast downloader
|
||||||
long_description = file: README.md
|
long_description = file: README.md
|
||||||
|
|
|
@ -65,7 +65,7 @@ CONFIG_VALUES = {
|
||||||
PRINT_DOWNLOAD_PROGRESS: { 'default': 'True', 'type': bool, 'arg': '--print-download-progress' },
|
PRINT_DOWNLOAD_PROGRESS: { 'default': 'True', 'type': bool, 'arg': '--print-download-progress' },
|
||||||
PRINT_ERRORS: { 'default': 'True', 'type': bool, 'arg': '--print-errors' },
|
PRINT_ERRORS: { 'default': 'True', 'type': bool, 'arg': '--print-errors' },
|
||||||
PRINT_DOWNLOADS: { 'default': 'False', 'type': bool, 'arg': '--print-downloads' },
|
PRINT_DOWNLOADS: { 'default': 'False', 'type': bool, 'arg': '--print-downloads' },
|
||||||
PRINT_API_ERRORS: { 'default': 'False', 'type': bool, 'arg': '--print-api-errors' },
|
PRINT_API_ERRORS: { 'default': 'True', 'type': bool, 'arg': '--print-api-errors' },
|
||||||
PRINT_PROGRESS_INFO: { 'default': 'True', 'type': bool, 'arg': '--print-progress-info' },
|
PRINT_PROGRESS_INFO: { 'default': 'True', 'type': bool, 'arg': '--print-progress-info' },
|
||||||
PRINT_WARNINGS: { 'default': 'True', 'type': bool, 'arg': '--print-warnings' },
|
PRINT_WARNINGS: { 'default': 'True', 'type': bool, 'arg': '--print-warnings' },
|
||||||
TEMP_DOWNLOAD_DIR: { 'default': '', 'type': str, 'arg': '--temp-download-dir' }
|
TEMP_DOWNLOAD_DIR: { 'default': '', 'type': str, 'arg': '--temp-download-dir' }
|
||||||
|
|
|
@ -84,6 +84,8 @@ WIDTH = 'width'
|
||||||
|
|
||||||
USER_READ_EMAIL = 'user-read-email'
|
USER_READ_EMAIL = 'user-read-email'
|
||||||
|
|
||||||
|
USER_FOLLOW_READ = 'user-follow-read'
|
||||||
|
|
||||||
PLAYLIST_READ_PRIVATE = 'playlist-read-private'
|
PLAYLIST_READ_PRIVATE = 'playlist-read-private'
|
||||||
|
|
||||||
USER_LIBRARY_READ = 'user-library-read'
|
USER_LIBRARY_READ = 'user-library-read'
|
||||||
|
|
|
@ -8,7 +8,7 @@ from librespot.core import Session
|
||||||
|
|
||||||
from zotify.const import TYPE, \
|
from zotify.const import TYPE, \
|
||||||
PREMIUM, USER_READ_EMAIL, OFFSET, LIMIT, \
|
PREMIUM, USER_READ_EMAIL, OFFSET, LIMIT, \
|
||||||
PLAYLIST_READ_PRIVATE, USER_LIBRARY_READ
|
PLAYLIST_READ_PRIVATE, USER_LIBRARY_READ, USER_FOLLOW_READ
|
||||||
from zotify.config import Config
|
from zotify.config import Config
|
||||||
|
|
||||||
class Zotify:
|
class Zotify:
|
||||||
|
@ -54,7 +54,9 @@ class Zotify:
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def __get_auth_token(cls):
|
def __get_auth_token(cls):
|
||||||
return cls.SESSION.tokens().get_token(USER_READ_EMAIL, PLAYLIST_READ_PRIVATE, USER_LIBRARY_READ).access_token
|
return cls.SESSION.tokens().get_token(
|
||||||
|
USER_READ_EMAIL, PLAYLIST_READ_PRIVATE, USER_LIBRARY_READ, USER_FOLLOW_READ
|
||||||
|
).access_token
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def get_auth_header(cls):
|
def get_auth_header(cls):
|
||||||
|
|
Loading…
Reference in a new issue