mirror of
https://git.deluge-torrent.org/deluge
synced 2025-08-04 07:28:39 +00:00
Fixed up EVENT_FINISHED event in core.handle_events(self).
This commit is contained in:
parent
76c8792ce4
commit
14b0ec2e96
1 changed files with 8 additions and 1 deletions
|
@ -523,6 +523,13 @@ class Manager:
|
||||||
if event is None:
|
if event is None:
|
||||||
break
|
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
|
print "EVENT: ", event
|
||||||
|
|
||||||
ret.append(event)
|
ret.append(event)
|
||||||
|
@ -530,7 +537,7 @@ class Manager:
|
||||||
if 'unique_ID' in event and \
|
if 'unique_ID' in event and \
|
||||||
event['unique_ID'] not in self.unique_IDs:
|
event['unique_ID'] not in self.unique_IDs:
|
||||||
continue
|
continue
|
||||||
|
|
||||||
# Call plugins events callbacks
|
# Call plugins events callbacks
|
||||||
if event['event_type'] in self.event_callbacks:
|
if event['event_type'] in self.event_callbacks:
|
||||||
for plugin_instance in self.event_callbacks[event['event_type']]:
|
for plugin_instance in self.event_callbacks[event['event_type']]:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue