mirror of
https://github.com/codex-storage/deluge.git
synced 2025-01-12 12:34:43 +00:00
Enable 'Queue new torrents to top'
This commit is contained in:
parent
dda5be096a
commit
b32c7de968
@ -261,6 +261,9 @@ class TorrentManager(component.Component):
|
||||
self.torrents[torrent.torrent_id] = torrent
|
||||
|
||||
# Add the torrent to the queue
|
||||
if queue == -1 and self.config["queue_new_to_top"]:
|
||||
self.queue.insert(0, torrent.torrent_id)
|
||||
else:
|
||||
self.queue.insert(queue, torrent.torrent_id)
|
||||
|
||||
# Set per-torrent options
|
||||
@ -283,6 +286,8 @@ class TorrentManager(component.Component):
|
||||
torrent.state = "Queued"
|
||||
elif state == "Paused":
|
||||
torrent.state = "Paused"
|
||||
elif state == None and not options["add_paused"]:
|
||||
torrent.handle.resume()
|
||||
|
||||
# Save the torrent file
|
||||
torrent.save_torrent_file(filedump)
|
||||
|
Loading…
x
Reference in New Issue
Block a user