diff --git a/bot/__init__.py b/bot/__init__.py index 76fca77..a42a0ae 100644 --- a/bot/__init__.py +++ b/bot/__init__.py @@ -84,7 +84,7 @@ try: MEGA_API_KEY = getConfig('MEGA_API_KEY') except KeyError: logging.warning('MEGA API KEY not provided!') - + MEGA_API_KEY = None try: MEGA_EMAIL_ID = getConfig('MEGA_EMAIL_ID') MEGA_PASSWORD = getConfig('MEGA_PASSWORD') diff --git a/bot/helper/mirror_utils/download_utils/mega_downloader.py b/bot/helper/mirror_utils/download_utils/mega_downloader.py index 1c8c987..081356a 100644 --- a/bot/helper/mirror_utils/download_utils/mega_downloader.py +++ b/bot/helper/mirror_utils/download_utils/mega_downloader.py @@ -121,7 +121,8 @@ class MegaDownloadHelper: def __init__(self): pass - def add_download(self, mega_link: str, path: str, listener): + @staticmethod + def add_download(mega_link: str, path: str, listener): if MEGA_API_KEY is None: raise MegaDownloaderException('Mega API KEY not provided! Cannot mirror mega links') executor = AsyncExecutor()