From 4936f2fdf245343c69b6a3a8fb8d1445e862c9ea Mon Sep 17 00:00:00 2001 From: lamusmaser <1940060+lamusmaser@users.noreply.github.com> Date: Sat, 11 Feb 2023 03:07:36 -0700 Subject: [PATCH] 412 fix `vid_type` with downloads (single and bulk) (#413) * update TA_VERSION v0.3.2 * Update `single_download` task to request proper `vid_type`. * Modify `single_download` to match bulk download. * pr 413: undo TA_VERSION update --------- Co-authored-by: simon --- tubearchivist/home/tasks.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tubearchivist/home/tasks.py b/tubearchivist/home/tasks.py index a2265fcd..4abc6cbf 100644 --- a/tubearchivist/home/tasks.py +++ b/tubearchivist/home/tasks.py @@ -111,9 +111,10 @@ def download_pending(): def download_single(pending_video): """start download single video now""" queue = RedisQueue(queue_name="dl_queue") + to_add = { "youtube_id": pending_video["youtube_id"], - "vid_type": pending_video["vid_type"], + "vid_type": pending_video.get("vid_type", VideoTypeEnum.VIDEOS.value), } queue.add_priority(json.dumps(to_add)) print(f"Added to queue with priority: {to_add}")