From 83beb53860c4c028d5a530c867440f7634e08fe3 Mon Sep 17 00:00:00 2001 From: simon Date: Mon, 2 May 2022 21:38:03 +0700 Subject: [PATCH] simplify _add_single to call update_status in PendingInteract directly --- tubearchivist/home/src/frontend/api_calls.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/tubearchivist/home/src/frontend/api_calls.py b/tubearchivist/home/src/frontend/api_calls.py index a734996..8b0d9b3 100644 --- a/tubearchivist/home/src/frontend/api_calls.py +++ b/tubearchivist/home/src/frontend/api_calls.py @@ -19,7 +19,6 @@ from home.src.ta.ta_redis import RedisArchivist, RedisQueue from home.tasks import ( download_pending, download_single, - extrac_dl, index_channel_playlists, kill_dl, re_sync_thumbs, @@ -230,9 +229,7 @@ class PostData: """add single youtube_id to download queue""" video_id = self.exec_val print(f"{video_id}: add single vid to download queue") - PendingInteract(video_id=video_id).delete_item() - video_ids = UrlListParser(video_id).process_list() - extrac_dl.delay(video_ids) + PendingInteract(video_id=video_id, status="pending").update_status() return {"success": True} def _delete_queue(self):