diff --git a/tubearchivist/home/src/frontend/api_calls.py b/tubearchivist/home/src/frontend/api_calls.py index 2175b115..5943c6cd 100644 --- a/tubearchivist/home/src/frontend/api_calls.py +++ b/tubearchivist/home/src/frontend/api_calls.py @@ -64,7 +64,6 @@ class PostData: "show_subed_only": self._show_subed_only, "dlnow": self._dlnow, "show_ignored_only": self._show_ignored_only, - "forgetIgnore": self._forget_ignore, "addSingle": self._add_single, "deleteQueue": self._delete_queue, "manual-import": self._manual_import, @@ -226,13 +225,6 @@ class PostData: RedisArchivist().set_message(key, value) return {"success": True} - def _forget_ignore(self): - """delete from ta_download index""" - video_id = self.exec_val - print(f"{video_id}: forget from download") - PendingInteract(video_id=video_id).delete_item() - return {"success": True} - def _add_single(self): """add single youtube_id to download queue""" video_id = self.exec_val diff --git a/tubearchivist/static/script.js b/tubearchivist/static/script.js index 188c6602..31e1d3d2 100644 --- a/tubearchivist/static/script.js +++ b/tubearchivist/static/script.js @@ -203,8 +203,8 @@ function downloadNow(button) { function forgetIgnore(button) { let youtube_id = button.getAttribute('data-id'); - let payload = JSON.stringify({ forgetIgnore: youtube_id }); - sendPost(payload); + let apiEndpoint = '/api/download/' + youtube_id + '/'; + apiRequest(apiEndpoint, "DELETE"); document.getElementById('dl-' + youtube_id).remove(); }