mirror of
https://github.com/lrnselfreliance/wrolpi.git
synced 2026-12-03 13:19:58 -05:00
Adding feature where Videos can be downloaded to a destination directory.
This commit is contained in:
parent
61d2ffde36
commit
f1bc29d76f
22 changed files with 248 additions and 181 deletions
|
|
@ -171,9 +171,9 @@ export async function deleteVideos(videoIds) {
|
|||
|
||||
export async function getDirectories(search_str) {
|
||||
let form_data = {'search_str': search_str || null};
|
||||
let response = await apiPost(`${VIDEOS_API}/directories`, form_data);
|
||||
let response = await apiPost(`${API_URI}/files/directories`, form_data);
|
||||
if (response.status === 200) {
|
||||
return (await response.json())['directories'];
|
||||
return await response.json();
|
||||
}
|
||||
return [];
|
||||
}
|
||||
|
|
@ -461,8 +461,14 @@ export async function getArchive(archiveId) {
|
|||
}
|
||||
}
|
||||
|
||||
export async function postDownload(urls, downloader, frequency, sub_downloader, excludedURLs) {
|
||||
let body = {urls: urls, downloader: downloader, frequency: frequency || null, excluded_urls: excludedURLs};
|
||||
export async function postDownload(urls, downloader, frequency, sub_downloader, excludedURLs, destination) {
|
||||
let body = {
|
||||
urls: urls,
|
||||
downloader: downloader,
|
||||
frequency: frequency || null,
|
||||
excluded_urls: excludedURLs,
|
||||
destination: destination || null,
|
||||
};
|
||||
if (sub_downloader) {
|
||||
body['sub_downloader'] = sub_downloader;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue