Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a command for bulk adding search results #71

Open
linduxed opened this issue Feb 2, 2022 · 0 comments
Open

Add a command for bulk adding search results #71

linduxed opened this issue Feb 2, 2022 · 0 comments

Comments

@linduxed
Copy link

linduxed commented Feb 2, 2022

Currently the search results can be added to a queue by clicking the button that is added to the search sidebar section.

The code can be found here:

async addSearchResultsToQueue() {
const files = await this.getSearchResults();
const pairs = files.map((file) =>
this.links.createAbsoluteLink(normalizePath(file.path), "")
);
if (pairs && pairs.length > 0) {
new BulkAdderModal(
this,
this.queue.queuePath,
"Bulk Add Search Results",
pairs
).open();
} else {
LogTo.Console("No files to add.", true);
}
}

Currently this functionality is not available, as this has not been added as a "command", like this:

this.addCommand({
id: "create-new-iw-queue",
name: "Create and load a new queue.",
callback: () => new CreateQueueModal(this).open(),
hotkeys: [],
});

Is this something that would be interesting to add?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant