Set auto_managed to False when pausing and saving resume data on

shutdown.
This commit is contained in:
Andrew Resch 2008-07-09 12:42:57 +00:00
parent 1b811e1ecb
commit 2423af8660
1 changed files with 2 additions and 0 deletions

View File

@ -169,6 +169,8 @@ class TorrentManager(component.Component):
component.pause("AlertManager") component.pause("AlertManager")
for key in self.torrents.keys(): for key in self.torrents.keys():
if not self.torrents[key].handle.is_paused(): if not self.torrents[key].handle.is_paused():
# We set auto_managed false to prevent lt from resuming the torrent
self.torrents[key].handle.auto_managed(False)
self.torrents[key].handle.pause() self.torrents[key].handle.pause()
self.shutdown_torrent_pause_list.append(key) self.shutdown_torrent_pause_list.append(key)
while self.shutdown_torrent_pause_list: while self.shutdown_torrent_pause_list: