fix: downloads randomly resuming after a few seconds when paused

credits to claude opus 4.5, i could not figure this out
This commit is contained in:
2026-02-09 23:17:18 +01:00
parent 9265a9cd1c
commit 88042b2d3d
+4 -1
View File
@@ -285,10 +285,13 @@ class MainWindow(QtWidgets.QMainWindow, QWidget):
subprocess.Popen(["open", save_path])
return
if status.paused:
is_paused = bool(magnetdl.flags() & lt.torrent_flags.paused)
if is_paused:
magnetdl.set_flags(lt.torrent_flags.auto_managed)
magnetdl.resume()
consoleLog(f"Resumed download: {status.name}", True)
else:
magnetdl.unset_flags(lt.torrent_flags.auto_managed)
magnetdl.pause()
consoleLog(f"Paused download: {status.name}", True)