From b5078571a21bd6d1850eb91b855a31be6e3957a8 Mon Sep 17 00:00:00 2001 From: Andrew Resch Date: Mon, 10 Mar 2008 09:19:49 +0000 Subject: [PATCH] Fix inserting into queue. --- deluge/core/torrentqueue.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/deluge/core/torrentqueue.py b/deluge/core/torrentqueue.py index 192066a70..49033e28d 100644 --- a/deluge/core/torrentqueue.py +++ b/deluge/core/torrentqueue.py @@ -218,6 +218,10 @@ class TorrentQueue(component.Component): if q == None: self.queue[self.queue.index(q)] = torrent_id return self.queue.index(q) + + self.queue.append(torrent_id) + return self.queue.index(torrent_id) + else: if position > (len(self.queue) - 1): self.queue.insert(position, torrent_id)