mirror of
https://github.com/Wan-Video/Wan2.1.git
synced 2025-11-05 14:33:15 +00:00
remove old move_up and move_down functions
This commit is contained in:
parent
7d0eb942b9
commit
c843772321
32
wgp.py
32
wgp.py
@ -911,38 +911,6 @@ def move_task(queue, old_index_str, new_index_str):
|
|||||||
|
|
||||||
return update_queue_data(queue)
|
return update_queue_data(queue)
|
||||||
|
|
||||||
def move_up(queue, selected_indices):
|
|
||||||
if not selected_indices or len(selected_indices) == 0:
|
|
||||||
return update_queue_data(queue)
|
|
||||||
idx = selected_indices[0]
|
|
||||||
if isinstance(idx, list):
|
|
||||||
idx = idx[0]
|
|
||||||
idx = int(idx)
|
|
||||||
with lock:
|
|
||||||
idx += 1
|
|
||||||
if idx > 1:
|
|
||||||
queue[idx], queue[idx-1] = queue[idx-1], queue[idx]
|
|
||||||
elif idx == 1:
|
|
||||||
queue[:] = queue[0:1] + queue[2:] + queue[1:2]
|
|
||||||
|
|
||||||
return update_queue_data(queue)
|
|
||||||
|
|
||||||
def move_down(queue, selected_indices):
|
|
||||||
if not selected_indices or len(selected_indices) == 0:
|
|
||||||
return update_queue_data(queue)
|
|
||||||
idx = selected_indices[0]
|
|
||||||
if isinstance(idx, list):
|
|
||||||
idx = idx[0]
|
|
||||||
idx = int(idx)
|
|
||||||
with lock:
|
|
||||||
idx += 1
|
|
||||||
if idx < len(queue)-1:
|
|
||||||
queue[idx], queue[idx+1] = queue[idx+1], queue[idx]
|
|
||||||
elif idx == len(queue)-1:
|
|
||||||
queue[:] = queue[0:1] + queue[-1:] + queue[1:-1]
|
|
||||||
|
|
||||||
return update_queue_data(queue)
|
|
||||||
|
|
||||||
def remove_task(queue, selected_indices):
|
def remove_task(queue, selected_indices):
|
||||||
if not selected_indices or len(selected_indices) == 0:
|
if not selected_indices or len(selected_indices) == 0:
|
||||||
return update_queue_data(queue)
|
return update_queue_data(queue)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user