parent
ba68e1efa4
commit
d49686e82d
|
@ -314,14 +314,6 @@ class Manager:
|
|||
self.remove_torrent_ns(unique_ID)
|
||||
self.sync()
|
||||
|
||||
# Remove .torrent and .fastresume
|
||||
os.remove(temp.filename)
|
||||
try:
|
||||
# Must be after removal of the torrent, because that saves a new .fastresume
|
||||
os.remove(temp.filename + ".fastresume")
|
||||
except OSError:
|
||||
pass # Perhaps there never was one to begin with
|
||||
|
||||
# Remove data, if asked to do so
|
||||
if data_also:
|
||||
# Must be done AFTER the torrent is removed
|
||||
|
@ -640,9 +632,17 @@ class Manager:
|
|||
to_delete.append(unique_ID)
|
||||
|
||||
for unique_ID in to_delete:
|
||||
temp = self.unique_IDs[unique_ID]
|
||||
self.state.torrents.remove(self.unique_IDs[unique_ID])
|
||||
self.state.queue.remove(unique_ID)
|
||||
del self.unique_IDs[unique_ID]
|
||||
# Remove .torrent and .fastresume
|
||||
os.remove(temp.filename)
|
||||
try:
|
||||
# Must be after removal of the torrent, because that saves a new .fastresume
|
||||
os.remove(temp.filename + ".fastresume")
|
||||
except OSError:
|
||||
pass # Perhaps there never was one to begin with
|
||||
|
||||
# Add torrents to queue - at the end, of course
|
||||
for unique_ID in self.unique_IDs.keys():
|
||||
|
|
Loading…
Reference in New Issue