Fix forced recheck.

This commit is contained in:
Andrew Resch 2008-03-30 00:18:11 +00:00
parent 4e5a20ba38
commit d22fa1299a

View File

@ -394,7 +394,7 @@ class TorrentManager(component.Component):
"""Forces a re-check of the torrent's data""" """Forces a re-check of the torrent's data"""
log.debug("Doing a forced recheck on %s", torrent_id) log.debug("Doing a forced recheck on %s", torrent_id)
torrent = self.torrents[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 torrent_info = None
### Check for .torrent file prior to removing and make a copy if needed ### Check for .torrent file prior to removing and make a copy if needed
if os.access(os.path.join(self.config["torrentfiles_location"] +\ if os.access(os.path.join(self.config["torrentfiles_location"] +\
@ -420,9 +420,9 @@ class TorrentManager(component.Component):
# Set the right storage_mode # Set the right storage_mode
if torrent.compact: if torrent.compact:
storage_mode = lt.storage_mode_t(1)
else:
storage_mode = lt.storage_mode_t(2) storage_mode = lt.storage_mode_t(2)
else:
storage_mode = lt.storage_mode_t(1)
# Add the torrent to the lt session # Add the torrent to the lt session
try: try:
@ -441,8 +441,6 @@ class TorrentManager(component.Component):
# Set the state to Checking # Set the state to Checking
torrent.set_state("Checking") torrent.set_state("Checking")
return True
def load_state(self): def load_state(self):
"""Load the state of the TorrentManager from the torrents.state file""" """Load the state of the TorrentManager from the torrents.state file"""
state = TorrentManagerState() state = TorrentManagerState()