Skip to content

fix(english/lightnoveltranslation): fix search and show 30 novels per page - #2737

Merged
rajarsheechatterjee merged 1 commit into
lnreader:masterfrom
RevDev909:fix-lightnoveltranslations-search
Oct 24, 2026
Merged

rajarsheechatterjee merged 1 commit into
lnreader:masterfrom
RevDev909:fix-lightnoveltranslations-search

Conversation

@RevDev909

Copy link
Copy Markdown
Contributor

Fixes the search on Light Novel Translations (v1.0.1 -> 1.0.2).

What was wrong:

  • Search sent ?search=, but the site's search box submits field-search. The site ignored the unknown parameter and returned its default browse list for every term, so results looked identical no matter what was searched.
  • Search returned empty for any page past 1, so it could never show more than one page of results.
  • The site serves only 6 novels per page, so opening the source showed a nearly empty grid next to sources that serve 20+ per page.

What changed:

  • Search now uses field-search and paginates the same way browse does.
  • One app page now fetches 5 consecutive site pages and combines them, so browse and search return 30 novels per app page (fewer when the site has fewer results left).

Testing:

  • Plugin live check passes: popularNovels 30 novels, searchNovels 1 result for an exact title search, parseNovel 610 chapters, parseChapter 8119 chars.
  • Verified on device: browse shows 30 novels per page with covers, searching "Reincarnated" returns matching titles, and a nonsense search returns nothing.

Closes #2736

@greptile-apps

greptile-apps Bot commented Oct 22, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 4/5

[Medium impact] The changes affect browsing and search for one novel source.

The PR appears safe to merge, with a non-blocking improvement to avoid fetching pages after results end.

Findings

  1. P2 Empty searches wait longer ▶

Summary

Updates Light Novel Translations to version 1.0.2.

  • Light Novel Translations combines five site pages for browsing and search.

Reviews (1) · Last reviewed commit: "fix(english/lightnoveltranslation): fix ..." · Reviewed by Greptile

Comment on lines +47 to +48
const cards = this.parseNovelCards(html);
novels.push(...cards);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Empty searches wait longer

fetchNovelCards keeps fetching after a site page returns no novels. An empty search therefore waits for five requests in a row. Short searches and final browse pages also make unnecessary requests after the results end. Stop the loop when cards.length === 0 before requesting another page.

Suggested change
const cards = this.parseNovelCards(html);
novels.push(...cards);
const cards = this.parseNovelCards(html);
if (cards.length === 0) break;
novels.push(...cards);

@rajarsheechatterjee
rajarsheechatterjee merged commit 531e7fb into lnreader:master Oct 24, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Light Novel Translations Only Displays 6 Results

2 participants