mirror of
https://github.com/codex-storage/deluge.git
synced 2025-01-27 03:36:16 +00:00
core:fix multiple queue_up/down
This commit is contained in:
parent
fa0847a45b
commit
882a7e8033
@ -538,6 +538,8 @@ class Core(
|
||||
|
||||
def export_queue_up(self, torrent_ids):
|
||||
log.debug("Attempting to queue %s to up", torrent_ids)
|
||||
#torrent_ids must be sorted before moving.
|
||||
torrent_ids.sort(key = lambda id: self.torrents.torrents[id].get_queue_position())
|
||||
for torrent_id in torrent_ids:
|
||||
try:
|
||||
# If the queue method returns True, then we should emit a signal
|
||||
@ -548,6 +550,8 @@ class Core(
|
||||
|
||||
def export_queue_down(self, torrent_ids):
|
||||
log.debug("Attempting to queue %s to down", torrent_ids)
|
||||
#torrent_ids must be sorted before moving.
|
||||
torrent_ids.sort(key = lambda id: -self.torrents.torrents[id].get_queue_position())
|
||||
for torrent_id in torrent_ids:
|
||||
try:
|
||||
# If the queue method returns True, then we should emit a signal
|
||||
|
Loading…
x
Reference in New Issue
Block a user