mirror of
https://github.com/KeksPirates/SoftwareManager.git
synced 2026-08-03 17:39:42 +02:00
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:
@@ -285,10 +285,13 @@ class MainWindow(QtWidgets.QMainWindow, QWidget):
|
|||||||
subprocess.Popen(["open", save_path])
|
subprocess.Popen(["open", save_path])
|
||||||
return
|
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()
|
magnetdl.resume()
|
||||||
consoleLog(f"Resumed download: {status.name}", True)
|
consoleLog(f"Resumed download: {status.name}", True)
|
||||||
else:
|
else:
|
||||||
|
magnetdl.unset_flags(lt.torrent_flags.auto_managed)
|
||||||
magnetdl.pause()
|
magnetdl.pause()
|
||||||
consoleLog(f"Paused download: {status.name}", True)
|
consoleLog(f"Paused download: {status.name}", True)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user