diff --git a/backend.py b/backend.py index 83016424..1c4f383f 100644 --- a/backend.py +++ b/backend.py @@ -81,6 +81,12 @@ def queue_status() -> Dict[str, Dict[str, Any]]: Dict: Queue status organized by status type """ status = book_queue.get_status() + for _, books in status.items(): + for _, book_info in books.items(): + if book_info.download_path: + if not os.path.exists(book_info.download_path): + book_info.download_path = None + # Convert Enum keys to strings and properly format the response return { status_type.value: books diff --git a/static/js/main.js b/static/js/main.js index e3e411af..dcc745f9 100644 --- a/static/js/main.js +++ b/static/js/main.js @@ -229,6 +229,10 @@ for (const [name, items] of Object.entries(data || {})) { if (!items || Object.keys(items).length === 0) continue; const rows = Object.values(items).map((b) => { + const titleText = utils.e(b.title) || '-'; + const maybeLinkedTitle = b.download_path + ? `${titleText}` + : titleText; const actions = (name === 'queued' || name === 'downloading') ? `` : ''; @@ -236,7 +240,7 @@ ? `