From c93e935b9c6f9091df9540ad30076bacd66e1578 Mon Sep 17 00:00:00 2001 From: simon Date: Mon, 30 May 2022 16:06:12 +0700 Subject: [PATCH] move delete download queue button to settings page --- tubearchivist/home/templates/home/downloads.html | 9 --------- tubearchivist/home/templates/home/settings.html | 6 ++++++ tubearchivist/static/script.js | 8 ++++---- 3 files changed, 10 insertions(+), 13 deletions(-) diff --git a/tubearchivist/home/templates/home/downloads.html b/tubearchivist/home/templates/home/downloads.html index 23dd98a..3ca469e 100644 --- a/tubearchivist/home/templates/home/downloads.html +++ b/tubearchivist/home/templates/home/downloads.html @@ -45,15 +45,6 @@ list view -
- {% if show_ignored_only %} -

Ignored from download

- - {% else %} -

Download queue

- - {% endif %} -

Total videos: {{ max_hits }}{% if max_hits == 10000 %}+{% endif %}

{% if results %} diff --git a/tubearchivist/home/templates/home/settings.html b/tubearchivist/home/templates/home/settings.html index d4cd7f5..a5bb82a 100644 --- a/tubearchivist/home/templates/home/settings.html +++ b/tubearchivist/home/templates/home/settings.html @@ -269,6 +269,12 @@

Actions

+
+

Delete download queue

+

Delete your pending or previously ignored videos from your download queue.

+ + +

Manual media files import.

Add files to the cache/import folder. Make sure to follow the instructions in the Github Wiki.

diff --git a/tubearchivist/static/script.js b/tubearchivist/static/script.js index 96ad261..47ef727 100644 --- a/tubearchivist/static/script.js +++ b/tubearchivist/static/script.js @@ -203,10 +203,10 @@ function deleteQueue(button) { var to_delete = button.getAttribute('data-id'); var payload = JSON.stringify({'deleteQueue': to_delete}); sendPost(payload); - setTimeout(function(){ - location.reload(); - return false; - }, 1000); + // clear button + var message = document.createElement('p'); + message.innerText = 'deleting download queue: ' + to_delete; + document.getElementById(button.id).replaceWith(message); } function stopQueue() {