Conversation
Tangerine Archive links coin-locked chapters as `#`, so the plugin dropped them and opening a locked chapter returned an empty body. Add an additive, default-off `includeLockedChapters` source option that keeps those rows in the list with the site's real `/chapter-<n>/` path and makes `parseChapter` report what actually happened instead of blank text: - Rebuild the locked path from the row's anchor text. The anchor text is not uniform: `Chapter 250 - (End of the Side Stories)` drops the title suffix, `Chapter 27.2` becomes `chapter-27-2`, and a non-ASCII token directly after the number (`Chapter 176 🔞`) is part of the site's own slug (`chapter-176-%F0%9F%94%9E`), while ` - ` starts a title suffix. - Throw a clear locked error naming the coin price and, when the listing has one, the free-unlock countdown or TBA. - Carry each rebuilt row's `data-chapter-<id>` into `parseChapter` and check it against the fetched page, so a derived URL that lands on a different chapter (duplicate chapter numbers) is named rather than silently served as the listed one, and a derived URL that falls back to the series page throws a "no chapter page" error instead of returning the series summary. - No release time for rebuilt rows: the listing only carries a countdown or TBA, which `parseData` would turn into a bogus past date. Only tangerinearchive opts in (plus `hasLocked` for the app's hide-locked switch, version 2.2.1). Other Madara sources take the old code path unchanged. Co-Authored-By: pi <noreply@pi.dev>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this is
Candidate fix for the premium (coin-locked) chapter problem in the Tangerine Archive source from
PR lnreader#2564, stacked on that PR's branch (
fm/lnreader-plugins-2555-tangerine).Tangerine Archive links coin-locked chapters as
href="#", so the plugin dropped them entirely andopening a locked chapter returned an empty body. This change lists them with the site's real
/chapter-<n>/path and makesparseChapterreport what actually happened instead of blank text.What changed
All of it is additive and behind a new default-off source option, so no other Madara source
changes behavior:
plugins/multisrc/madara/template.tsincludeLockedChapters?: booleaninMadaraOptions;parseNovel: forpremium-blockrows whosehrefis#, rebuild the real path from thelisting's own anchor text instead of dropping the row;
parseChapter: when the flag is on, read the fetched page and throw a clear error for a lockedpage (coin price from the page's
coin-Ngate class, plus the listing's free-unlock countdown orTBA), for a derived URL that fell back to the series page (no chapter page), and for a derived
URL that resolves to a different chapter (duplicate chapter numbers).
releaseTime: nullfor rebuilt rows: the listing carries only a countdown/TBA, whichparseDatawould turn into a bogus past date.
plugins/multisrc/madara/sources.json:tangerinearchiveopts in(
includeLockedChapters: true,hasLocked: truefor the app's existing hide-locked switch,versionIncrements: 1-> plugin 2.2.1).plugins/multisrc/madara/README.md: documents the new option.The anchor-text rule (non-uniform by design)
Verified against the live listings; the rule is not a plain
Chapter (\d+)match:Chapter 250 - (End of the Side Stories)chapter-250/(title suffix dropped)Chapter 239 - SS-IV. (AU)chapter-239/Chapter 27.2chapter-27-2/(dot -> dash)Chapter 176 🔞chapter-176-%F0%9F%94%9E/(non-ASCII token directly after the number is part of the site's slug)Chapter 242 - 🔞chapter-242/(a-separator starts a title, not the slug)The page-identity guard (the gap this PR closes beyond the sibling candidate)
Each rebuilt row's own
data-chapter-<id>is carried intoparseChapterand compared with thefetched page's
#wp-manga-current-chap[data-id].villain-let-me-touch-youhas two premium rowsnumbered
Chapter 166(ids 16701 and 16700);/chapter-166/serves 16700, so the notice names thechapter the URL actually serves instead of presenting it as the row the reader picked. A derived URL
that silently renders the series page throws a "no chapter page" error instead of returning the
series summary.
What was probed (live, anonymous, read-only - no cookies, no sessions, no nonces, no purchases)
npm run build:compileandnpm run build:multisrcpass;eslintandprettier --checkon thechanged files pass.
npm run check:pluginon the generated Tangerine plugin: PASS (popularNovels 12,searchNovels PASS, parseNovel 173 chapters, parseChapter 14497 chars).
npm run check:pluginon two unrelated Madara sources with the flag off -SleepyTranslations[madara]PASS (16 novels / 44 chapters / 9872 chars) andLovelyblossoms[madara]PASS (16 novels / 5 chapters / 15373 chars). A third,CitrusAurora[madara], also passes in the custom probe..scratch/probe-plugin.mjs, 28/28 checks) against the generated plugin:locked path equals the path derived independently from the live row, every free path equals the
live
href;chapter-160/parses 6538 chars of prose; lockedchapter-161/throws"it costs 10 coins, it unlocks for free in 1 day"; locked
chapter-212/throws TBA; a wrongderived slug throws the missing-page error;
villain-let-me-touch-you: 191 chapters = live list;Chapter 176 🔞rebuilds the emoji slugand throws the locked error; the duplicate
Chapter 166pair is listed and the read names theserved chapter;
in-the-doghouseChapter 250 - (End of the Side Stories)->chapter-250/;how-to-survive-as-a-supporting-male-leadChapter 27.2->chapter-27-2/;data-id== row id, gatepresent);
includeLockedChaptersundefined and take the unchanged path.wp-manga-sitemap.xml, 3359 rows: 672 premium +2687 free): the slug rule reproduces 2686/2687 free
hrefs (2669 identical + 17 equal afterpercent-decoding; the single miss is a free duplicate with a real
href), and 0 premium rows lacka leading
Chapter <n>.What was NOT tested
spends coins, so the actual prose of a still-locked chapter was not read. The plugin reports the
gate honestly instead of serving it. The only routes to the prose remain the site's own scheduled
free unlock and an owner-provided entitled session.
cannot be read in the same session, the locked error still fires from the page alone, just without
the countdown.
not for the feature.