mirror of
https://git.deluge-torrent.org/deluge
synced 2025-08-11 19:08:40 +00:00
core:fix multiple queue_up/down
This commit is contained in:
parent
fa0847a45b
commit
882a7e8033
1 changed files with 4 additions and 0 deletions
|
@ -538,6 +538,8 @@ class Core(
|
||||||
|
|
||||||
def export_queue_up(self, torrent_ids):
|
def export_queue_up(self, torrent_ids):
|
||||||
log.debug("Attempting to queue %s to up", 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:
|
for torrent_id in torrent_ids:
|
||||||
try:
|
try:
|
||||||
# If the queue method returns True, then we should emit a signal
|
# 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):
|
def export_queue_down(self, torrent_ids):
|
||||||
log.debug("Attempting to queue %s to down", 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:
|
for torrent_id in torrent_ids:
|
||||||
try:
|
try:
|
||||||
# If the queue method returns True, then we should emit a signal
|
# If the queue method returns True, then we should emit a signal
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue