Adding feature where Videos can be downloaded to a destination directory.

This commit is contained in:
Roland 2022-11-09 08:33:55 -07:00
parent 61d2ffde36
commit f1bc29d76f
No known key found for this signature in database
GPG key ID: 9D6DBD3ACF11AB93
22 changed files with 248 additions and 181 deletions

View file

@ -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;
}