mirror of
https://github.com/THIS-IS-NOT-A-BACKUP/zspotify.git
synced 2026-01-10 17:00:01 +00:00
simplified audio formats
This commit is contained in:
@@ -17,7 +17,7 @@ from librespot.audio.decoders import VorbisOnlyAudioQuality
|
||||
from librespot.core import Session
|
||||
|
||||
from const import CREDENTIALS_JSON, TYPE, \
|
||||
PREMIUM, USER_READ_EMAIL, AUTHORIZATION, OFFSET, LIMIT, CONFIG_FILE_PATH, FORCE_PREMIUM, RAW_AUDIO_AS_IS, \
|
||||
PREMIUM, USER_READ_EMAIL, AUTHORIZATION, OFFSET, LIMIT, CONFIG_FILE_PATH, FORCE_PREMIUM, \
|
||||
PLAYLIST_READ_PRIVATE
|
||||
from utils import MusicFormat
|
||||
|
||||
@@ -29,7 +29,6 @@ class ZSpotify:
|
||||
|
||||
def __init__(self):
|
||||
ZSpotify.load_config()
|
||||
ZSpotify.check_raw()
|
||||
ZSpotify.login()
|
||||
|
||||
@classmethod
|
||||
@@ -62,11 +61,6 @@ class ZSpotify:
|
||||
def get_config(cls, key) -> Any:
|
||||
return cls.CONFIG.get(key)
|
||||
|
||||
@classmethod
|
||||
def check_raw(cls) -> None:
|
||||
if cls.get_config(RAW_AUDIO_AS_IS):
|
||||
cls.DOWNLOAD_FORMAT = MusicFormat.WAV
|
||||
|
||||
@classmethod
|
||||
def get_content_stream(cls, content_id, quality):
|
||||
return cls.SESSION.content_feeder().load(content_id, VorbisOnlyAudioQuality(quality), False, None)
|
||||
|
||||
Reference in New Issue
Block a user