mirror of
https://github.com/nathom/streamrip.git
synced 2025-05-20 10:15:23 -04:00
Basic album downloading working
This commit is contained in:
parent
b7ace1d8d0
commit
129f3d8fe6
6 changed files with 164 additions and 79 deletions
|
@ -103,6 +103,8 @@ class ClientInterface(ABC):
|
|||
|
||||
|
||||
class QobuzClient(ClientInterface):
|
||||
source = "qobuz"
|
||||
|
||||
# ------- Public Methods -------------
|
||||
def __init__(self):
|
||||
self.logged_in = False
|
||||
|
@ -193,10 +195,6 @@ class QobuzClient(ClientInterface):
|
|||
def get_file_url(self, item_id, quality=6) -> dict:
|
||||
return self._api_get_file_url(item_id, quality=quality)
|
||||
|
||||
@property
|
||||
def source(self):
|
||||
return "qobuz"
|
||||
|
||||
# ---------- Private Methods ---------------
|
||||
|
||||
# Credit to Sorrow446 for the original methods
|
||||
|
@ -355,6 +353,8 @@ class QobuzClient(ClientInterface):
|
|||
|
||||
|
||||
class DeezerClient(ClientInterface):
|
||||
source = "deezer"
|
||||
|
||||
def __init__(self):
|
||||
self.session = requests.Session()
|
||||
self.logged_in = True
|
||||
|
@ -412,12 +412,10 @@ class DeezerClient(ClientInterface):
|
|||
logger.debug(f"Download url {url}")
|
||||
return url
|
||||
|
||||
@property
|
||||
def source(self):
|
||||
return "deezer"
|
||||
|
||||
|
||||
class TidalClient(ClientInterface):
|
||||
source = "tidal"
|
||||
|
||||
def __init__(self):
|
||||
self.logged_in = False
|
||||
|
||||
|
@ -468,10 +466,6 @@ class TidalClient(ClientInterface):
|
|||
logger.debug(f"Fetching file url with quality {quality}")
|
||||
return self._get_file_url(meta_id, quality=min(TIDAL_MAX_Q, quality))
|
||||
|
||||
@property
|
||||
def source(self):
|
||||
return "tidal"
|
||||
|
||||
def _search(self, query, media_type="album", **kwargs):
|
||||
params = {
|
||||
"query": query,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue