From 964a24cdd594f1d57b78792cc63e40ed630fa1b0 Mon Sep 17 00:00:00 2001 From: arabcoders Date: Sat, 26 Jul 2025 21:14:53 +0300 Subject: [PATCH] completed the ts migration --- app/library/Utils.py | 16 +- app/routes/api/browser.py | 1 + ui/app/components/History.vue | 272 +++++++++++++++------------------- ui/app/components/Queue.vue | 196 ++++++++++-------------- ui/app/types/store.d.ts | 10 +- 5 files changed, 217 insertions(+), 278 deletions(-) diff --git a/app/library/Utils.py b/app/library/Utils.py index dd70aff9..e1e949ba 100644 --- a/app/library/Utils.py +++ b/app/library/Utils.py @@ -373,14 +373,18 @@ def check_id(file: Path) -> bool | str: id = match.groupdict().get("id") - for f in file.parent.iterdir(): - if id not in f.stem: - continue + try: + for f in file.parent.iterdir(): + if id not in f.stem: + continue - if f.suffix != file.suffix: - continue + if f.suffix != file.suffix: + continue - return f.absolute() + return f.absolute() + except OSError as e: + LOG.error(f"Error checking file '{file}': {e!s}") + return False return False diff --git a/app/routes/api/browser.py b/app/routes/api/browser.py index e6c78fa8..1d09876a 100644 --- a/app/routes/api/browser.py +++ b/app/routes/api/browser.py @@ -324,6 +324,7 @@ async def prepare_zip_file(request: Request, config: Config, cache: Cache): for f in json: if not isinstance(f, str): continue + ref, status = get_file(download_path=config.download_path, file=f) if status == web.HTTPNotFound.status_code: continue diff --git a/ui/app/components/History.vue b/ui/app/components/History.vue index 5a394551..aa833526 100644 --- a/ui/app/components/History.vue +++ b/ui/app/components/History.vue @@ -161,7 +161,7 @@
@@ -188,7 +188,8 @@ - - diff --git a/ui/app/components/Queue.vue b/ui/app/components/Queue.vue index 26b44fbb..53ad7830 100644 --- a/ui/app/components/Queue.vue +++ b/ui/app/components/Queue.vue @@ -108,7 +108,7 @@
{{ updateProgress(item) }}
-
+
@@ -119,7 +119,8 @@