Fixed some issues in cx_freeze

This commit is contained in:
Manuel Cortez 2020-07-12 20:31:15 -05:00
parent b9302000f6
commit 7d9067a611
4 changed files with 18 additions and 6 deletions

View File

@ -16,9 +16,12 @@ log = logging.getLogger("services.tidal")
class interface(base.baseInterface):
name = "tidal"
enabled = config.app["services"]["tidal"].get("enabled")
# This should not be enabled if credentials are not set in config.
if config.app["services"]["tidal"]["username"] == "" or config.app["services"]["tidal"]["password"] == "":
if config.app != None: # Workaround for cx_freeze 6.2 in python 3.7.
enabled = config.app["services"]["tidal"].get("enabled")
# This should not be enabled if credentials are not set in config.
if config.app["services"]["tidal"]["username"] == "" or config.app["services"]["tidal"]["password"] == "":
enabled = False
else:
enabled = False
def __init__(self):

View File

@ -18,7 +18,10 @@ access_token = "e2237f17af545a4ba0bf6cb0b1a662e6"
class interface(base.baseInterface):
""" Class downloader for VK audios. """
name = "vk"
enabled = config.app["services"]["vk"].get("enabled")
if config.app != None: # Workaround for cx_freeze 6.2 in python 3.7.
enabled = config.app["services"]["vk"].get("enabled")
else:
enabled = False
#util functions.
def get_auth(self):

View File

@ -10,7 +10,10 @@ log = logging.getLogger("extractors.youtube.com")
class interface(base.baseInterface):
name = "YouTube"
enabled = config.app["services"]["youtube"].get("enabled")
if config.app != None: # Workaround for cx_freeze 6.2 in python 3.7.
enabled = config.app["services"]["youtube"].get("enabled")
else:
enabled = False
def search(self, text, page=1):
if text == "" or text == None:

View File

@ -13,7 +13,10 @@ log = logging.getLogger("extractors.zaycev.net")
class interface(base.baseInterface):
name = "zaycev.net"
enabled = config.app["services"]["zaycev"].get("enabled")
if config.app != None: # Workaround for cx_freeze 6.2 in python 3.7.
enabled = config.app["services"]["zaycev"].get("enabled")
else:
enabled = False
def search(self, text, page=1):
if text == "" or text == None: