fix: 修复重复 URL 添加被静默跳过且无提示的问题

This commit is contained in:
tigerenwork 2026-08-15 15:33:00 +08:00
parent 3fafb98651
commit bb642b29f2
1 changed files with 6 additions and 1 deletions

View File

@ -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}"'}