mirror of
https://git.deluge-torrent.org/deluge
synced 2025-08-02 22:48:40 +00:00
Enable 'Queue new torrents to top'
This commit is contained in:
parent
dda5be096a
commit
b32c7de968
1 changed files with 6 additions and 1 deletions
|
@ -261,7 +261,10 @@ class TorrentManager(component.Component):
|
||||||
self.torrents[torrent.torrent_id] = torrent
|
self.torrents[torrent.torrent_id] = torrent
|
||||||
|
|
||||||
# Add the torrent to the queue
|
# Add the torrent to the queue
|
||||||
self.queue.insert(queue, torrent.torrent_id)
|
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
|
# Set per-torrent options
|
||||||
torrent.set_max_connections(options["max_connections_per_torrent"])
|
torrent.set_max_connections(options["max_connections_per_torrent"])
|
||||||
|
@ -283,6 +286,8 @@ class TorrentManager(component.Component):
|
||||||
torrent.state = "Queued"
|
torrent.state = "Queued"
|
||||||
elif state == "Paused":
|
elif state == "Paused":
|
||||||
torrent.state = "Paused"
|
torrent.state = "Paused"
|
||||||
|
elif state == None and not options["add_paused"]:
|
||||||
|
torrent.handle.resume()
|
||||||
|
|
||||||
# Save the torrent file
|
# Save the torrent file
|
||||||
torrent.save_torrent_file(filedump)
|
torrent.save_torrent_file(filedump)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue