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() {