From bb642b29f217ad05ac73b4c4abc7a70ccde7a0ce Mon Sep 17 00:00:00 2001 From: tigerenwork Date: Sat, 15 Aug 2026 15:33:00 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E9=87=8D=E5=A4=8D=20U?= =?UTF-8?q?RL=20=E6=B7=BB=E5=8A=A0=E8=A2=AB=E9=9D=99=E9=BB=98=E8=B7=B3?= =?UTF-8?q?=E8=BF=87=E4=B8=94=E6=97=A0=E6=8F=90=E7=A4=BA=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/ytdl.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/app/ytdl.py b/app/ytdl.py index 1cf252b..0fac5d8 100644 --- a/app/ytdl.py +++ b/app/ytdl.py @@ -867,7 +867,12 @@ class DownloadQueue: key = entry.get('webpage_url') or entry['url'] if not self.queue.exists(key): dl = DownloadInfo(video_id, entry.get('title') or video_id, key, quality, format, folder, custom_name_prefix, error, entry, playlist_item_limit) - await self.__add_download(dl, auto_start) + result = await self.__add_download(dl, auto_start) + if result: + # __add_download reports a skipped duplicate or an error + # (e.g. {'status': 'ok', 'msg': 'Download already exists'}); + # surface that instead of an unconditional success. + return result return {'status': 'ok'} return {'status': 'error', 'msg': f'Unsupported resource "{etype}"'}