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