This commit is contained in:
Alon Zakai 2007-01-11 14:20:15 +00:00
commit db76205737

View file

@ -593,10 +593,9 @@ class Manager:
print torrents_with_unique_ID print torrents_with_unique_ID
# Remove torrents from core, unique_IDs and queue # Remove torrents from core, unique_IDs and queue
to_delete = [] to_delete = []
for torrent in self.state.torrents: for unique_ID in self.unique_IDs.keys():
print torrent # print torrent
if torrent.delete_me: if self.unique_IDs[unique_ID].delete_me:
unique_ID = torrents_with_unique_ID.index(torrent)
deluge_core.remove_torrent(unique_ID) deluge_core.remove_torrent(unique_ID)
to_delete.append(unique_ID) to_delete.append(unique_ID)
@ -606,7 +605,7 @@ class Manager:
del self.unique_IDs[unique_ID] del self.unique_IDs[unique_ID]
# Add torrents to queue - at the end, of course # Add torrents to queue - at the end, of course
for unique_ID in self.unique_IDs: for unique_ID in self.unique_IDs.keys():
if unique_ID not in self.state.queue: if unique_ID not in self.state.queue:
self.state.queue.append(unique_ID) self.state.queue.append(unique_ID)