Handle large WeebCentral catalogs and correct MangaPill checkpoint monitoring

This commit is contained in:
Codex committed 2026-10-14 14:01:05 +02:00
1 parent 0d51f214d5
commit edbc9c6056
11 files changed
+102 -7

No files matched your search

+6 -1
View File
@@ -254,8 +254,13 @@ test('WeebCentral fragments preserve chapter and page order', () => {
test('WeebCentral reports unrecognized chapter labels separately from an empty catalog', async () => {
const series = '<h1>Example</h1><div hx-get="/series/X/full-chapter-list"></div>';
const httpFor = list => ({ get: async url => ({ text: async () => url.endsWith('full-chapter-list') ? list : series }) });
const requests = [];
const httpFor = list => ({ get: async (url, options) => { requests.push({ url, options }); return {
text: async () => url.endsWith('full-chapter-list') ? list : series,
}; } });
const unknown = await discoverWeebCatalog('https://weebcentral.com/series/X/Example', httpFor('<a href="/chapters/ABC">Part One</a>'));
assert.equal(requests[0].options.catalog, undefined);
assert.equal(requests[1].options.catalog, true);
assert.equal(unknown.chapterLinks, 1);
assert.equal(unknown.chapters.length, 0);
assert.equal(unknown.availability.reason, 'unrecognized-labels');