From 73944fd47ccb323443b2576a527559ef96652532 Mon Sep 17 00:00:00 2001 From: ArabCoders Date: Sat, 30 Dec 2023 22:01:06 +0300 Subject: [PATCH] Small fixes for displaying errors. --- app/src/Download.py | 10 ++++++++-- frontend/src/components/Form-Add.vue | 1 - frontend/src/components/Page-Completed.vue | 11 +++++++---- 3 files changed, 15 insertions(+), 7 deletions(-) diff --git a/app/src/Download.py b/app/src/Download.py index ce4c843f..1691b972 100644 --- a/app/src/Download.py +++ b/app/src/Download.py @@ -109,6 +109,8 @@ class Download: **mergeConfig(self.default_ytdl_opts, self.ytdl_opts), } + params['ignoreerrors'] = False + if self.debug: params['verbose'] = True @@ -133,8 +135,12 @@ class Download: self.status_queue.put( {'status': 'finished' if ret == 0 else 'error'} ) - except yt_dlp.utils.YoutubeDLError as exc: - self.status_queue.put({'status': 'error', 'msg': str(exc)}) + except Exception as exc: + self.status_queue.put({ + 'status': 'error', + 'msg': str(exc), + 'error': str(exc) + }) if self.tempPath and self.info._id and os.path.exists(self.tempPath): logging.debug(f'Deleting Temp directory: {self.tempPath}') diff --git a/frontend/src/components/Form-Add.vue b/frontend/src/components/Form-Add.vue index 682b8f47..bc919cf3 100644 --- a/frontend/src/components/Form-Add.vue +++ b/frontend/src/components/Form-Add.vue @@ -221,7 +221,6 @@ bus.on((event, data) => { if (data?.status === 'ok') { url.value = ''; } - url.value = data.url; addInProgress.value = false; } }); diff --git a/frontend/src/components/Page-Completed.vue b/frontend/src/components/Page-Completed.vue index 2abb6aa1..6eab8911 100644 --- a/frontend/src/components/Page-Completed.vue +++ b/frontend/src/components/Page-Completed.vue @@ -67,7 +67,7 @@