Fixed up EVENT_FINISHED event in core.handle_events(self).

This commit is contained in:
Alex Dedul 2007-07-14 08:24:54 +00:00
parent 76c8792ce4
commit 14b0ec2e96
1 changed files with 8 additions and 1 deletions

View File

@ -523,6 +523,13 @@ class Manager:
if event is None:
break
# EVENT_FINISHED fires after integrity checks as well, so ensure
# we actually downloaded torrent now by making sure at least some
# bytes have been downloaded for it in this session
if event['event_type'] is self.constants['EVENT_FINISHED'] and \
self.get_core_torrent_state(event['unique_ID'])['total_payload_download'] == 0:
continue
print "EVENT: ", event
ret.append(event)