diff --git a/core/network/libtorrent_int.py b/core/network/libtorrent_int.py index 42357ec..89751a2 100644 --- a/core/network/libtorrent_int.py +++ b/core/network/libtorrent_int.py @@ -36,7 +36,7 @@ def init_session(): settings["listen_interfaces"] = f"{interface_ip}:6881" consoleLog(f"Binding to Interface IP: {interface_ip}") else: - consoleLog(f"Error finding IP for Interface {state.bound_interface}") + consoleLog(f"Skipping Binding, no Interface set. ({state.bound_interface})") state.dl_session.apply_settings(settings) @@ -51,7 +51,7 @@ def add_download(magnet_uri, dl_path=state.download_path): init_session() if magnet_uri in state.active_downloads: - consoleLog("Skipping, download already running...") + consoleLog("Skipping Downloading, download already running...") return magnetdl = lt.parse_magnet_uri(magnet_uri) @@ -114,7 +114,7 @@ def update_settings(): settings["listen_interfaces"] = f"{interface_ip}:6881" consoleLog(f"Binding to Interface IP: {interface_ip}") else: - consoleLog(f"Error finding IP for Interface {state.bound_interface}") + consoleLog(f"Skipping Binding, no Interface set. ({state.bound_interface})") state.dl_session.apply_settings(settings) diff --git a/core/utils/general/logs.py b/core/utils/general/logs.py index 2c75d0a..49f0ae1 100644 --- a/core/utils/general/logs.py +++ b/core/utils/general/logs.py @@ -24,7 +24,12 @@ def add_download_log(title, url, magnet_uri, completed) -> DownloadList: if any(d.magnet_uri == magnet_uri or d.url == url for d in downloads): - consoleLog("Skipped Logging, download already in file") + if magnet_uri in state.active_downloads: + consoleLog("Skipping Logging, download already running...") + return + consoleLog("File already in Log, updating Download State...") + hash = extract_hash_from_magnet(magnet_uri) + update_download_completed_by_hash(hash, False) return DownloadList(data=downloads, count=len(downloads)) # thanks again claude (im stupid)