Conversation
The site replaced its Madara theme: the series list now renders cards as onclick divs, novels moved from /series/<slug>/ to /<slug>/, the full chapter list is embedded as JSON, and chapter paragraphs are shuffled and padded with CSS-hidden decoys. The plugin fell back to the only /series/ link left (the nav item 'Novels'), so the library showed a single entry. Parse the new listing (with paging and the site's filters), search via the series keyword filter, read chapters from TD_Story_Chapters, map old /series/<slug>/ library paths, and restore chapter paragraph order. Closes lnreader#2509
|
| async parseNovel(novelPath: string): Promise<Plugin.SourceNovel> { | ||
| // Novels used to live under /series/<slug>/; that URL now redirects to | ||
| // the first chapter, so map old library entries to /<slug>/. | ||
| const sitePath = novelPath.replace(/^\/series\/([^/]+)\/?$/, '/$1/'); |
There was a problem hiding this comment.
If someone enters a full old URL such as https://indratranslations.com/series/infinite-mage/, parseNovel skips the rewrite and follows the site's redirect to chapter one. The novel details and chapter list then fail to load. Rewrite full URLs from this site as well as relative paths.
There was a problem hiding this comment.
Fixed in 4605c5f. parseNovel now strips the host from same-site URLs first (indratranslations.com with or without www., exact host only), then rewrites /series/<slug>/ to /<slug>/. The rewrite also works without a trailing slash and ignores a query or fragment. URLs on other hosts are left as they are. I checked Infinite Mage in relative, full-URL (www, no slash, and ?ref=x variants) and new-path forms, and every form returns the novel with 234 chapters. (AI agent reply)
| { label: 'Fantasy', value: '10' }, | ||
| { label: 'Harem', value: '53' }, | ||
| { label: 'Horror', value: '16' }, | ||
| { label: 'Madure', value: '33' }, |
There was a problem hiding this comment.
The new genre picker says “Madure.” Readers looking for “Mature” may not recognize the filter. Correct the label without changing its value.
| { label: 'Madure', value: '33' }, | |
| { label: 'Mature', value: '33' }, |
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
There was a problem hiding this comment.
Fixed in 4605c5f: the label now reads "Mature" and the value is still 33. I checked the other filter labels and found no other typos. ("Sci-fi" is spelled the same way as on the site.) (AI agent reply)
…ature label Normalize same-site absolute novel URLs (with or without www, trailing slash, query or fragment) before rewriting /series/<slug>/ to /<slug>/, leave other hosts untouched, don't append a slash after a query, and correct the 'Madure' genre label to 'Mature' (value unchanged).
Closes #2509
What was wrong
indratranslations.com dropped its Madara theme for a custom one. Nothing the plugin looked for is in the markup anymore:
div.series-cardelements that navigate withonclick="location.href='…'"and contain no<a>. None of the plugin's card layouts matched, so its last-resort "any link containing/series/" fallback picked the one link left: the nav menu item "Novels" →/series/. That's the single "novels" entry in the issue screenshots./series/<slug>/to/<slug>/. The old URL now 301-redirects to the novel's first chapter, so older library entries can't load their details either.TD_Story_ChaptersJSON array.#chapter-content-text .td-reading-flow. Paragraphs are shuffled in the HTML and put back in order with CSSorder/data-order. The site also adds decoys that only CSS hides:.td-s-noiseword spans,.td-s-para-noiseparagraphs, hidden watermarks, and a canary span.What changed (
plugins/english/indraTranslations.ts, 1.2.1 → 1.3.0)popularNovels: parses.series-card(name, path, cover) and pages with/series/page/N/(past the last page the site returns an empty grid). It also passes the site's own filters: sort (newest/updated/views/rating/chapters/nominated), genre, status, and type. The old filter was a placeholder with a single "Latest" option. "Latest" mode usesorderby=update.searchNovels: uses the series page'skeywordfilter, with the same paging.parseNovel: reads the new title, cover, synopsis, genres, and status selectors and builds the chapter list fromTD_Story_Chapters(number, release date, 🔒 prefix on paid/VIP chapters). If that JSON is missing, it falls back to the rendered list. Legacy/series/<slug>/entries are mapped to/<slug>/so existing library entries still work. This covers relative paths and full same-site URLs (with or withoutwww., a trailing slash, a query or a fragment). URLs on other hosts are left as they are.parseChapter: removes the decoy elements and sorts paragraphs bydata-order. Locked chapters return the site's own "VIP Chapter, please log in" notice.Testing
npm run check:plugin -- plugins/english/indraTranslations.tsrun locally against the live site:popularNovelssearchNovelsparseNovelparseChapterI also ran a local spot-check script that bundles the plugin the same way the checker does:
/infinite-mage/,/series/infinite-mage/,/series/infinite-mage,https://indratranslations.com/series/infinite-mage/,https://www.indratranslations.com/series/infinite-mage,https://indratranslations.com/series/infinite-mage/?ref=xandhttps://indratranslations.com/infinite-mage/, whilehttps://example.com/series/x/is left unchangedstyle/data-orderattributeseslint,prettier --check, andtsc --noEmitpass on the changed file. I re-ran all of these, pluscheck:plugin(4/4 PASS), after the review follow-up commit. Only the plugin file changed. I didn't test in the app itself.🤖 This PR was written by an AI agent (Claude Code). It has not been reviewed by a human, so please weight your review accordingly.