feat: added the option to select all at options at the same time
This commit is contained in:
parent
3cb35909d1
commit
ab61ff7e9b
@ -365,8 +365,12 @@ class Downloader:
|
|||||||
self.search(":".join(input_str.split(":")[1:]))
|
self.search(":".join(input_str.split(":")[1:]))
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
def get_selected_objects(q: str):
|
||||||
|
if q.strip().lower() == "all":
|
||||||
|
return list(self.current_results)
|
||||||
|
|
||||||
indices = []
|
indices = []
|
||||||
for possible_index in query.split(","):
|
for possible_index in q.split(","):
|
||||||
possible_index = possible_index.strip()
|
possible_index = possible_index.strip()
|
||||||
if possible_index == "":
|
if possible_index == "":
|
||||||
continue
|
continue
|
||||||
@ -382,7 +386,9 @@ class Downloader:
|
|||||||
|
|
||||||
indices.append(i)
|
indices.append(i)
|
||||||
|
|
||||||
selected_objects = [self.current_results[i] for i in indices]
|
return [self.current_results[i] for i in indices]
|
||||||
|
|
||||||
|
selected_objects = get_selected_objects(query)
|
||||||
|
|
||||||
if do_merge:
|
if do_merge:
|
||||||
old_selected_objects = selected_objects
|
old_selected_objects = selected_objects
|
||||||
|
Loading…
Reference in New Issue
Block a user