This commit is contained in:
Simon 2023-07-25 00:05:43 +07:00
parent ddfab4a341
commit 4c681d813d
No known key found for this signature in database
GPG Key ID: 2C15AA5E89985DD4

View File

@ -160,12 +160,12 @@ function dlPending() {
}, 500); }, 500);
} }
function addToQueue(autostart=false) { function addToQueue(autostart = false) {
let textArea = document.getElementById('id_vid_url'); let textArea = document.getElementById('id_vid_url');
if (textArea.value === '') { if (textArea.value === '') {
return return;
} }
let toPost = {data: [{youtube_id: textArea.value, status: 'pending'}]}; let toPost = { data: [{ youtube_id: textArea.value, status: 'pending' }] };
let apiEndpoint = '/api/download/'; let apiEndpoint = '/api/download/';
if (autostart) { if (autostart) {
apiEndpoint = `${apiEndpoint}?autostart=true`; apiEndpoint = `${apiEndpoint}?autostart=true`;