Remove setting torrent.is_finished in the resume alert

Set torrent.is_finished to false when torrent is in a Checking or Downloading state
This commit is contained in:
Andrew Resch 2012-02-29 15:20:59 -08:00
commit 2ae936df44

View file

@ -989,7 +989,6 @@ class TorrentManager(component.Component):
torrent_id = str(alert.handle.info_hash()) torrent_id = str(alert.handle.info_hash())
except: except:
return return
torrent.is_finished = torrent.handle.is_seed()
old_state = torrent.state old_state = torrent.state
torrent.update_state() torrent.update_state()
if torrent.state != old_state: if torrent.state != old_state:
@ -1009,7 +1008,7 @@ class TorrentManager(component.Component):
torrent.update_state() torrent.update_state()
# Torrent may need to download data after checking. # Torrent may need to download data after checking.
if torrent.state == 'Checking': if torrent.state in ('Checking', 'Checking Resume Data', 'Downloading'):
torrent.is_finished = False torrent.is_finished = False
# Only emit a state changed event if the state has actually changed # Only emit a state changed event if the state has actually changed