fix: LibTorrent not detecting that file has been deleted until LibTorrent Session is reinitialized / enhance download management with file existence checks and cleanup

This commit is contained in:
Vxrtrauter
2026-03-07 00:45:27 +01:00
parent 925fe21d03
commit dcc12c0b28
4 changed files with 49 additions and 5 deletions
+3 -1
View File
@@ -1,7 +1,7 @@
from core.interface.gui import MainWindow, windowCloseHelper
from core.utils.data.state import state
from core.utils.logging.logs import consoleLog
from core.network.libtorrent_misc import send_notification, update_log
from core.network.libtorrent_misc import send_notification, update_log, check_deleted_files
from core.utils.logging.logs import get_download_logs
from core.utils.general.shutdown import closehelper, shutdown_event
from core.utils.general.wrappers import run_thread
@@ -53,6 +53,8 @@ def main():
consoleLog("Started Thread: update_log")
run_thread(threading.Thread(target=check_completed, args=(downloads, state.autoresume)))
consoleLog("Started Thread: check_completed")
run_thread(threading.Thread(target=check_deleted_files, args=(shutdown_event,), daemon=True))
consoleLog("Started Thread: check_deleted_files")
check_downloads(downloads)
elapsed = time.perf_counter() - start_time
consoleLog(f"Initialization completed in {elapsed:.2f}s. Launching GUI")