mirror of
https://git.deluge-torrent.org/deluge
synced 2025-08-06 16:38:43 +00:00
Fix inserting into queue.
This commit is contained in:
parent
616fa74051
commit
b5078571a2
1 changed files with 4 additions and 0 deletions
|
@ -218,6 +218,10 @@ class TorrentQueue(component.Component):
|
||||||
if q == None:
|
if q == None:
|
||||||
self.queue[self.queue.index(q)] = torrent_id
|
self.queue[self.queue.index(q)] = torrent_id
|
||||||
return self.queue.index(q)
|
return self.queue.index(q)
|
||||||
|
|
||||||
|
self.queue.append(torrent_id)
|
||||||
|
return self.queue.index(torrent_id)
|
||||||
|
|
||||||
else:
|
else:
|
||||||
if position > (len(self.queue) - 1):
|
if position > (len(self.queue) - 1):
|
||||||
self.queue.insert(position, torrent_id)
|
self.queue.insert(position, torrent_id)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue