From 7253217e1830143a8f2e3e5f433b196a949ea806 Mon Sep 17 00:00:00 2001 From: Nixevol Date: Sat, 24 Oct 2026 23:16:08 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E6=AD=A3=E6=B8=85=E5=8D=95?= =?UTF-8?q?=E8=BF=9B=E5=BA=A6=E6=96=87=E5=AD=97=E6=8A=98=E8=A1=8C=EF=BC=8C?= =?UTF-8?q?=E9=BB=98=E8=AE=A4=E6=9C=80=E5=A4=9A=E7=BF=BB=2099=20=E9=A1=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 进度数字固定在进度条左侧,不再被挤出窗口。 --- server/services/dramabox/catalog.py | 2 +- tests/test_dramabox.py | 6 +++--- ui/src/App.vue | 6 +++--- ui/src/views/VideoListPage.vue | 32 ++++++++++++++++++----------- 4 files changed, 27 insertions(+), 19 deletions(-) diff --git a/server/services/dramabox/catalog.py b/server/services/dramabox/catalog.py index bc4f210..182a087 100644 --- a/server/services/dramabox/catalog.py +++ b/server/services/dramabox/catalog.py @@ -10,7 +10,7 @@ from server.services.dramabox.client import client from server.services.dramabox.covers import covers ROOT = Path(__file__).resolve().parents[3] -DEFAULT_MAX_PAGES = 300 +DEFAULT_MAX_PAGES = 99 MAX_MAX_PAGES = 999 diff --git a/tests/test_dramabox.py b/tests/test_dramabox.py index b9ad6f9..9f1e9dd 100644 --- a/tests/test_dramabox.py +++ b/tests/test_dramabox.py @@ -422,9 +422,9 @@ def test_catalog_page_limit_defaults_and_clamps() -> None: with tempfile.TemporaryDirectory() as tmp: path = Path(tmp) / "catalog-settings.json" with patch.object(cat, "settings_path", lambda: path), patch.object(cat, "_drop_catalog_cache"): - assert cat.page_limit() == 300 - assert cat.set_page_limit(0) == 300 - assert cat.set_page_limit(-8) == 300 + assert cat.page_limit() == 99 + assert cat.set_page_limit(0) == 99 + assert cat.set_page_limit(-8) == 99 assert cat.set_page_limit(12) == 12 assert cat.page_limit() == 12 assert cat.set_page_limit(5000) == 999 diff --git a/ui/src/App.vue b/ui/src/App.vue index 1ddb9cd..630401d 100644 --- a/ui/src/App.vue +++ b/ui/src/App.vue @@ -164,7 +164,7 @@ const downloadRef = ref<{ loadDirectory: () => Promise; } | null>(null); const catalogQuery = ref(""); -const catalogMaxPages = ref(300); +const catalogMaxPages = ref(99); let catalogPagesTimer: number | null = null; const mainMenu = computed(() => [ { label: "视频清单", key: "download" }, @@ -402,7 +402,7 @@ function normalizeWorkers(value: unknown) { function normalizeCatalogPages(value: unknown) { const count = Number(value); - if (!Number.isInteger(count) || count < 1) return 300; + if (!Number.isInteger(count) || count < 1) return 99; return Math.min(count, 999); } @@ -414,7 +414,7 @@ async function loadCatalogSettings() { const payload = await response.json(); catalogMaxPages.value = normalizeCatalogPages(payload.max_pages); } catch { - catalogMaxPages.value = 300; + catalogMaxPages.value = 99; } } diff --git a/ui/src/views/VideoListPage.vue b/ui/src/views/VideoListPage.vue index 5a23edf..551f533 100644 --- a/ui/src/views/VideoListPage.vue +++ b/ui/src/views/VideoListPage.vue @@ -732,15 +732,16 @@ async function startDownload() {