From d22fa1299a407684b8334adf2c1103ec799ee8cb Mon Sep 17 00:00:00 2001 From: Andrew Resch Date: Sun, 30 Mar 2008 00:18:11 +0000 Subject: [PATCH] Fix forced recheck. --- deluge/core/torrentmanager.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/deluge/core/torrentmanager.py b/deluge/core/torrentmanager.py index f38a6ec2c..b557794ab 100644 --- a/deluge/core/torrentmanager.py +++ b/deluge/core/torrentmanager.py @@ -394,7 +394,7 @@ class TorrentManager(component.Component): """Forces a re-check of the torrent's data""" log.debug("Doing a forced recheck on %s", torrent_id) torrent = self.torrents[torrent_id] - paused = self.torrents[torrent_id].handle.status().paused + paused = self.torrents[torrent_id].handle.is_paused() torrent_info = None ### Check for .torrent file prior to removing and make a copy if needed if os.access(os.path.join(self.config["torrentfiles_location"] +\ @@ -420,9 +420,9 @@ class TorrentManager(component.Component): # Set the right storage_mode if torrent.compact: - storage_mode = lt.storage_mode_t(1) - else: storage_mode = lt.storage_mode_t(2) + else: + storage_mode = lt.storage_mode_t(1) # Add the torrent to the lt session try: @@ -433,7 +433,7 @@ class TorrentManager(component.Component): paused=paused) except RuntimeError, e: log.warning("Error adding torrent: %s", e) - + if not torrent.handle or not torrent.handle.is_valid(): # The torrent was not added to the session return False @@ -441,8 +441,6 @@ class TorrentManager(component.Component): # Set the state to Checking torrent.set_state("Checking") - return True - def load_state(self): """Load the state of the TorrentManager from the torrents.state file""" state = TorrentManagerState()