fix: /filter 每页最多50条 (fixed121)
Docker Build & Test / build (push) Canceled after 0s
Docker Build & Test / test (push) Canceled after 0s
Build & Push Docker image / build-and-push (linux/amd64) (push) Canceled after 0s
Build & Push Docker image / build-and-push (linux/arm/v7) (push) Canceled after 0s
Build & Push Docker image / build-and-push (linux/arm64) (push) Canceled after 0s
Build & Push Docker image / merge-images (push) Canceled after 0s

This commit is contained in:
jinghui committed 2026-11-10 16:18:09 +08:00
1 parent 9d765b9f49
commit 40473955d8
2 files changed
+6 -4

No files matched your search

+4 -2
View File
@@ -166,7 +166,7 @@ async function browseSite(
const batch = Math.min(Math.max(opts.batch || BATCH_DEFAULT, 1), 6);
const want = 24;
const maxPages = 30;
const list: any[] = [];
let list: any[] = [];
let hasMore = true;
let fetched = 0;
while (hasMore && fetched < maxPages) {
@@ -191,6 +191,7 @@ async function browseSite(
});
if (list.length >= want || !hasMore) break;
}
list = list.slice(0, 50);
return { list, next_pg: pg, has_more: hasMore };
}
@@ -222,7 +223,7 @@ async function browseAll(
)
);
const seen = new Set<string>();
const list: any[] = [];
let list: any[] = [];
let hasMore = false;
let nextPg = Infinity;
per.forEach((r) => {
@@ -236,6 +237,7 @@ async function browseAll(
}
});
});
list = list.slice(0, 50);
return { list, next_pg: nextPg === Infinity ? pg + 1 : nextPg, has_more: hasMore };
}