apply_queue after all queuing operations
This commit is contained in:
parent
d195907bde
commit
cb4358f65e
|
@ -409,6 +409,7 @@ class Manager:
|
||||||
temp = self.state.queue[curr_index - 1]
|
temp = self.state.queue[curr_index - 1]
|
||||||
self.state.queue[curr_index - 1] = unique_ID
|
self.state.queue[curr_index - 1] = unique_ID
|
||||||
self.state.queue[curr_index] = temp
|
self.state.queue[curr_index] = temp
|
||||||
|
self.apply_queue()
|
||||||
|
|
||||||
def queue_down(self, unique_ID):
|
def queue_down(self, unique_ID):
|
||||||
curr_index = self.get_queue_index(unique_ID)
|
curr_index = self.get_queue_index(unique_ID)
|
||||||
|
@ -416,12 +417,14 @@ class Manager:
|
||||||
temp = self.state.queue[curr_index + 1]
|
temp = self.state.queue[curr_index + 1]
|
||||||
self.state.queue[curr_index + 1] = unique_ID
|
self.state.queue[curr_index + 1] = unique_ID
|
||||||
self.state.queue[curr_index] = temp
|
self.state.queue[curr_index] = temp
|
||||||
|
self.apply_queue()
|
||||||
|
|
||||||
def queue_bottom(self, unique_ID):
|
def queue_bottom(self, unique_ID):
|
||||||
curr_index = self.get_queue_index(unique_ID)
|
curr_index = self.get_queue_index(unique_ID)
|
||||||
if curr_index < (len(self.state.queue) - 1):
|
if curr_index < (len(self.state.queue) - 1):
|
||||||
self.state.queue.remove(curr_index)
|
self.state.queue.remove(curr_index)
|
||||||
self.state.queue.append(unique_ID)
|
self.state.queue.append(unique_ID)
|
||||||
|
self.apply_queue()
|
||||||
|
|
||||||
def clear_completed(self):
|
def clear_completed(self):
|
||||||
for unique_ID in self.unique_IDs:
|
for unique_ID in self.unique_IDs:
|
||||||
|
@ -430,6 +433,7 @@ class Manager:
|
||||||
self.remove_torrent_ns(unique_ID)
|
self.remove_torrent_ns(unique_ID)
|
||||||
|
|
||||||
self.sync()
|
self.sync()
|
||||||
|
self.apply_queue()
|
||||||
|
|
||||||
# Enforce the queue: pause/unpause as needed, based on queue and user_pausing
|
# Enforce the queue: pause/unpause as needed, based on queue and user_pausing
|
||||||
# This should be called after changes to relevant parameters (user_pausing, or
|
# This should be called after changes to relevant parameters (user_pausing, or
|
||||||
|
|
Loading…
Reference in New Issue