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

View File

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

View File

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

View File

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