mirror of
https://github.com/tubearchivist/tubearchivist
synced 2024-11-19 15:25:51 +00:00
switch forget ignored to API call
This commit is contained in:
parent
db21ee8bcb
commit
bad4b48573
@ -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
|
||||
|
@ -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();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user