Add Deezer support for rip discover

This commit is contained in:
Nathan Thomas 2021-08-19 18:13:05 -07:00
parent 87c6894386
commit 22d2a649ce
6 changed files with 70 additions and 19 deletions

View file

@ -499,7 +499,19 @@ class DeezerClient(Client):
"""
# TODO: use limit parameter
try:
search_function = getattr(self.client.api, f"search_{media_type}")
if media_type == "featured":
if query:
print(query)
search_function = getattr(
self.client.api, f"get_editorial_{query}"
)
else:
search_function = self.client.api.get_editorial_releases
else:
search_function = getattr(
self.client.api, f"search_{media_type}"
)
except AttributeError:
raise Exception