From 22b3b31895ccd73c036c6cc5a3eedd727fe25db2 Mon Sep 17 00:00:00 2001 From: Manuel Cortez Date: Thu, 20 Jun 2019 10:18:49 -0500 Subject: [PATCH] Check if credentials exists for displaying this module in the services list --- src/extractors/tidal.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/extractors/tidal.py b/src/extractors/tidal.py index 0bbc766..08dceef 100644 --- a/src/extractors/tidal.py +++ b/src/extractors/tidal.py @@ -10,11 +10,15 @@ log = logging.getLogger("extractors.tidal.com") class interface(object): name = "tidal" 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): self.results = [] self.needs_transcode = False 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"]): quality = getattr(tidalapi.Quality, config.app["services"]["tidal"]["quality"]) else: