multiple tracker messages

This commit is contained in:
Alon Zakai 2006-12-08 09:05:07 +00:00
parent 91a4d5f93e
commit 6021a9a1e4
1 changed files with 20 additions and 6 deletions

View File

@ -395,12 +395,26 @@ class manager:
if self.auto_seed_ratio == -1: if self.auto_seed_ratio == -1:
self.apply_queue(efficient = False) # To work on current data self.apply_queue(efficient = False) # To work on current data
elif event['event_type'] is self.constants['EVENT_TRACKER']: elif event['event_type'] is self.constants['EVENT_TRACKER']:
self.set_supp_torrent_state_val( event['unique_ID'], unique_ID = event['unique_ID']
status = event['tracker_status']
message = event['message']
tracker = message[message.find('"')+1:message.rfind('"')]
self.set_supp_torrent_state_val(unique_ID,
"tracker_status", "tracker_status",
event['tracker_status']) (tracker, status))
self.set_supp_torrent_state_val( event['unique_ID'],
"tracker_message", old_state = self.get_supp_torrent_state(unique_ID)
event['message']) try:
new = old_state['tracker_messages']
except KeyError:
new = {}
new[tracker] = message
self.set_supp_torrent_state_val(unique_ID,
"tracker_messages",
new)
event = pytorrent_core.pop_event() event = pytorrent_core.pop_event()