mirror of
https://github.com/nathom/streamrip.git
synced 2025-05-18 17:25:22 -04:00
Raise IneligibleError if featured lists are accessed with Deezloader
This commit is contained in:
parent
22d2a649ce
commit
0b22c36c4e
4 changed files with 10 additions and 5 deletions
|
@ -26,6 +26,7 @@ from streamrip.clients import (
|
|||
from streamrip.constants import MEDIA_TYPES
|
||||
from streamrip.exceptions import (
|
||||
AuthenticationError,
|
||||
IneligibleError,
|
||||
ItemExists,
|
||||
MissingCredentials,
|
||||
NonStreamable,
|
||||
|
@ -653,7 +654,14 @@ class RipCore(list):
|
|||
logger.debug("searching for %s", query)
|
||||
|
||||
client = self.get_client(source)
|
||||
|
||||
if isinstance(client, DeezloaderClient) and media_type == "featured":
|
||||
raise IneligibleError(
|
||||
"Must have premium Deezer account to access editorial lists."
|
||||
)
|
||||
|
||||
results = client.search(query, media_type)
|
||||
|
||||
if media_type == "featured":
|
||||
media_type = "album"
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue