Conversation
Tangerine Archive marks coin-locked chapters in its ajax chapter list as `li.wp-manga-chapter.premium.coin-N.data-chapter-<id>.premium-block` with `href="#"` plus either an "Unlocked in ..." countdown or `TBA`, so the `href != '#'` guard dropped every locked chapter from the listing: readers saw a chapter list with holes and, reaching such a chapter another way, a blank chapter body. The Madara template now reads that markup into an explicit per-chapter access state (free / coin-locked(N) / scheduled(countdown|TBA)), lists locked chapters with the state in the name and a derived permalink (`series/<slug>/chapter-<n>/`), and makes `parseChapter` fail loudly instead of returning an empty body. The fetched page stays the ground truth for whether a chapter is gated, so a chapter that unlocks between listing and reading still reads normally, and a page that is not the chapter the listing points at (the source keeps a few locked chapters under a different permalink, e.g. emoji slugs or duplicate numbers) is reported as such rather than shown as somebody else's chapter or as the series page. Locked rows get no fabricated release date: their countdown or `TBA` is already in the name. Everything is opt-in through the new additive `listLockedChapters` option, so other Madara sources are unaffected; tangerinearchive opts in, gains the existing "Hide locked chapters" switch, and bumps to 2.2.1. No gated text is fetched, unlocked or bypassed: locked chapters are only listed and labelled. Co-authored-by: firstmate-crewmate <crewmate@firstmate.local>
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.
Stacked on lnreader#2564 (base
fm/lnreader-plugins-2555-tangerine). Fixes the gap that PR's body documents: premium (coin-locked) chapters are now listed and labelled, and open with an honest locked error instead of disappearing from the list or coming back blank.What changed
plugins/multisrc/madara/template.ts+plugins/multisrc/madara/sources.json(generated plugin not committed).New opt-in source option
listLockedChapters, off by default, so every other Madara source takes the previous code path:parseNovelreads the source's locked-row markup (premium,premium-block,content-blocked,coin-N) plus the release span (Unlocked in N days|weeks|months/TBA) into an explicit per-chapter state:free,coin-locked(N)orscheduled(countdown|TBA).series/<slug>/chapter-<n>/), e.g.🔒 Chapter 212 (10 coins, TBA),🔒 Chapter 161 (10 coins, unlocks in 1 day). They were previously dropped because theirhrefis#.releaseTime: nullrather than a fabricated date (parseData("Unlocked in 4 weeks")would have reported a date four weeks in the past).parseChapterdecides on the fetched page, not on the listing: a gated body (.reading-content .content-blocked/.premium-block) throwsThis chapter is locked on Tangerine Archive (scheduled: 10 coins, unlocks in 1 day). Its text is only available after unlocking it on the site.Price comes from the page'scoin-Nclass; the countdown (listing-only information) is added when the plugin has just listed the novel.did not return a chapter page; the URL resolves to a different chapter id (duplicate numbers) →its page could not be identified.tangerinearchiveopts in, also gains the existing "Hide locked chapters" switch, and bumps to2.2.1.Probed live (anonymous, read-only, no login/cookies/purchase)
POST /series/<slug>/ajax/chapters/for 7 series: locked rows are uniform —premium coin-N data-chapter-<id> premium-block,href="#",span.coinbadge,TBAorUnlocked in ..., every one with a leadingChapter <n>in the title.#wp-manga-current-chapdata-idequal to that row's owndata-chapter-<id>.holy-night/…/chapter-359/is listed as free but its page is gated (now reported as locked);villain-let-me-touch-youhasChapter 176 🔞(chapter-176/falls back to the series page; the real slug carries the emoji) and a duplicateChapter 166(ids 16701/16700;chapter-166/resolves to 16700)./api/chapters/<id>404,?p=<chapter id>404,action=manga_get_chapters→0,action=manga_get_reading_navoptions carrydata-redirect="#"for premium rows,?style=listunchanged, sitemaps list free chapters only,/wp-json/wp/v2/typeshas no chapter CPT.Validation
npm run build:multisrc,npm run build:compile, eslint and prettier on the changed files: pass.npm run check:plugin -- 'plugins/english/TangerineArchive[madara].ts': popularNovels 12, searchNovels PASS, parseNovel 173 chapters, parseChapter 14497 chars — all PASS.SleepyTranslations[madara],LightNovelHeaven[madara]andWuxiaWorldSite[madara]all PASS.Foxaholic/BoxNovelwere INCONCLUSIVE (Cloudflare 403) andZetroTranslation'spopularNovelsFAIL is pre-existing (its site now serves a "Zetro is moving" page).What was NOT tested / is not in scope
<div class="… content-blocked premium-block">This chapter is locked!</div>in.reading-content, the prose is absent from the DOM (0 text blocks > 200 chars on a locked page vs 2 on a free one). This PR neither includes, unlocks nor redistributes gated text: it lists and labels locked chapters and reports them honestly when opened. Reading one still requires unlocking it on the site.Authored with AI assistance (see the
Co-authored-bytrailer) — please weight the review accordingly.