Check if credentials exists for displaying this module in the services list
This commit is contained in:
parent
2e67a1ae63
commit
22b3b31895
@ -10,11 +10,15 @@ log = logging.getLogger("extractors.tidal.com")
|
|||||||
class interface(object):
|
class interface(object):
|
||||||
name = "tidal"
|
name = "tidal"
|
||||||
enabled = config.app["services"]["tidal"].get("enabled")
|
enabled = config.app["services"]["tidal"].get("enabled")
|
||||||
|
# This should not be enabled if credentials are not in config.
|
||||||
|
if config.app["services"]["tidal"]["username"] == "" or config.app["services"]["tidal"]["password"] == "":
|
||||||
|
enabled = False
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
self.results = []
|
self.results = []
|
||||||
self.needs_transcode = False
|
self.needs_transcode = False
|
||||||
log.debug("started extraction service for {0}".format(self.name,))
|
log.debug("started extraction service for {0}".format(self.name,))
|
||||||
|
# Assign quality or switch to high if not specified/not found.
|
||||||
if hasattr(tidalapi.Quality, config.app["services"]["tidal"]["quality"]):
|
if hasattr(tidalapi.Quality, config.app["services"]["tidal"]["quality"]):
|
||||||
quality = getattr(tidalapi.Quality, config.app["services"]["tidal"]["quality"])
|
quality = getattr(tidalapi.Quality, config.app["services"]["tidal"]["quality"])
|
||||||
else:
|
else:
|
||||||
|
Loading…
Reference in New Issue
Block a user