From 95c9eca99f35d70ad5837929f2f35ec563fc69b1 Mon Sep 17 00:00:00 2001 From: Codex Date: Sun, 9 Aug 2026 13:26:36 +0200 Subject: [PATCH] Close search modal after add actions --- CHANGELOG.md | 4 ++++ VERSION | 2 +- search_page.py | 2 ++ test_app.py | 4 ++++ 4 files changed, 11 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6857b76..9418e1c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## 0.51.9 - 2026-08-09 + +- Closed the Search result floating window after successful Add to queue or Add to watchlist actions. + ## 0.51.8 - 2026-08-09 - Added structured Kaizoku downloader progress events for episode starts, provider resolution, segment downloads, remuxing, and completion. diff --git a/VERSION b/VERSION index 17ec66d..4bbc119 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.51.8 +0.51.9 diff --git a/search_page.py b/search_page.py index ae43c34..e6634d1 100644 --- a/search_page.py +++ b/search_page.py @@ -747,6 +747,7 @@ INDEX_HTML = r""" }) }); setNotice(data.message || "Added to watchlist."); + closeSelectionModal(); } catch (error) { setNotice(error.message); } @@ -771,6 +772,7 @@ INDEX_HTML = r""" try { await api("/api/queue", { method: "POST", body: JSON.stringify(payload) }); setNotice("Added to queue. Open Queue to monitor progress."); + closeSelectionModal(); } catch (error) { setNotice(error.message); } diff --git a/test_app.py b/test_app.py index 86d994b..8c25861 100644 --- a/test_app.py +++ b/test_app.py @@ -4130,6 +4130,10 @@ class TemplateHelperTests(unittest.TestCase): def test_search_page_sends_watchlist_auto_download_series(self): self.assertIn('auto_download_series: $("seasonInput").value || "1"', APP.INDEX_HTML) + def test_search_page_closes_selection_modal_after_successful_actions(self): + self.assertIn('setNotice(data.message || "Added to watchlist.");\n closeSelectionModal();', APP.INDEX_HTML) + self.assertIn('setNotice("Added to queue. Open Queue to monitor progress.");\n closeSelectionModal();', APP.INDEX_HTML) + def test_queue_page_includes_clear_failed_bulk_action(self): self.assertIn('id="clearFailedBtn"', APP.QUEUE_HTML) self.assertIn('/api/queue/clear-failed', APP.QUEUE_HTML)