mirror of
https://github.com/nathom/streamrip.git
synced 2025-05-12 22:26:16 -04:00
Add Deezer support for rip discover
This commit is contained in:
parent
87c6894386
commit
22d2a649ce
6 changed files with 70 additions and 19 deletions
|
@ -654,6 +654,8 @@ class RipCore(list):
|
|||
|
||||
client = self.get_client(source)
|
||||
results = client.search(query, media_type)
|
||||
if media_type == "featured":
|
||||
media_type = "album"
|
||||
|
||||
if isinstance(results, Generator): # QobuzClient
|
||||
for page in results:
|
||||
|
@ -670,11 +672,11 @@ class RipCore(list):
|
|||
if i >= limit - 1:
|
||||
return
|
||||
else:
|
||||
logger.debug("Not generator")
|
||||
items = (
|
||||
results.get("data")
|
||||
or results.get("items")
|
||||
or results.get("collection")
|
||||
or results.get("albums", {}).get("data", False)
|
||||
)
|
||||
if items is None:
|
||||
raise NoResultsFound(query)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue