diff --git a/tubearchivist/home/src/download/queue.py b/tubearchivist/home/src/download/queue.py
index 1ff7917..006b7a0 100644
--- a/tubearchivist/home/src/download/queue.py
+++ b/tubearchivist/home/src/download/queue.py
@@ -273,7 +273,7 @@ class PendingList(PendingIndex):
# add last newline
bulk_list.append("\n")
query_str = "\n".join(bulk_list)
- _, _ = ElasticWrap("_bulk").post(query_str, ndjson=True)
+ _, _ = ElasticWrap("_bulk?refresh=true").post(query_str, ndjson=True)
def _notify_add(self, idx, total):
"""send notification for adding videos to download queue"""
diff --git a/tubearchivist/home/templates/home/downloads.html b/tubearchivist/home/templates/home/downloads.html
index a1d9be2..59f4f03 100644
--- a/tubearchivist/home/templates/home/downloads.html
+++ b/tubearchivist/home/templates/home/downloads.html
@@ -20,11 +20,12 @@
Add to download queue
diff --git a/tubearchivist/static/css/style.css b/tubearchivist/static/css/style.css
index 07b59c0..9ece987 100644
--- a/tubearchivist/static/css/style.css
+++ b/tubearchivist/static/css/style.css
@@ -369,6 +369,10 @@ button:hover {
display: none;
}
+#hidden-form button {
+ margin-right: 1rem;
+}
+
#text-reveal {
height: 0;
overflow: hidden;
diff --git a/tubearchivist/static/script.js b/tubearchivist/static/script.js
index 5916144..cc77074 100644
--- a/tubearchivist/static/script.js
+++ b/tubearchivist/static/script.js
@@ -160,18 +160,22 @@ function dlPending() {
}, 500);
}
-function addToQueue() {
+function addToQueue(autostart=false) {
let textArea = document.getElementById('id_vid_url');
if (textArea.value === '') {
return
}
let toPost = {data: [{youtube_id: textArea.value, status: 'pending'}]};
let apiEndpoint = '/api/download/';
+ if (autostart) {
+ apiEndpoint = `${apiEndpoint}?autostart=true`;
+ }
apiRequest(apiEndpoint, 'POST', toPost);
- textArea.value = "";
+ textArea.value = '';
setTimeout(function () {
checkMessages();
}, 500);
+ showForm();
}
function toIgnore(button) {