mirror of
https://github.com/lrnselfreliance/wrolpi.git
synced 2026-11-19 22:46:20 -05:00
Files can be searched.
This commit is contained in:
parent
a5e8ef16b6
commit
643c86e9a4
7 changed files with 187 additions and 87 deletions
|
|
@ -352,19 +352,16 @@ export async function postDownload(urls, downloader) {
|
|||
return response;
|
||||
}
|
||||
|
||||
|
||||
export async function killDownload(download_id) {
|
||||
let response = await apiPost(`${API_URI}/download/${download_id}/kill`);
|
||||
return response;
|
||||
}
|
||||
|
||||
|
||||
export async function killDownloads() {
|
||||
let response = await apiPost(`${API_URI}/download/kill`);
|
||||
return response;
|
||||
}
|
||||
|
||||
|
||||
export async function startDownloads() {
|
||||
let response = await apiPost(`${API_URI}/download/enable`);
|
||||
return response;
|
||||
|
|
@ -375,6 +372,16 @@ export async function getDownloaders() {
|
|||
return await response.json();
|
||||
}
|
||||
|
||||
export async function filesSearch(offset, limit, searchStr) {
|
||||
const body = {search_str: searchStr, offset: parseInt(offset), limit: parseInt(limit)};
|
||||
const response = await apiPost(`${API_URI}/files/search`, body);
|
||||
return await response.json();
|
||||
}
|
||||
|
||||
export async function refreshFiles() {
|
||||
return await apiPost(`${API_URI}/files/refresh`);
|
||||
}
|
||||
|
||||
export async function getFiles(directories) {
|
||||
let body = {directories: directories || []};
|
||||
let response = await apiPost(`${API_URI}/files`, body);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue