diff --git a/core/network/aria2_wrapper.py b/core/network/aria2_wrapper.py index fd1afbd..46361da 100644 --- a/core/network/aria2_wrapper.py +++ b/core/network/aria2_wrapper.py @@ -8,8 +8,11 @@ def start_client(): consoleLog("Started Aria2p") def add_magnet(uri): - aria2.add_magnet(uri) - consoleLog("Magnet URI added to Aria2") + if uri is not None and uri.startswith("magnet:?"): + aria2.add_magnet(uri) + consoleLog("Magnet URI added to Aria2") + else: + consoleLog(f"Invalid Magnet Link: {uri}") diff --git a/core/utils/general/loghandler.py b/core/utils/general/loghandler.py index adf5e71..f064e00 100644 --- a/core/utils/general/loghandler.py +++ b/core/utils/general/loghandler.py @@ -1,4 +1,3 @@ -from core.utils.data.state import state from core.utils.general.logs import consoleLog from core.utils.network.download import run_download_direct