Repository navigation
fix(english/lightnoveltranslation): fix search and show 30 novels per page - #2737
Merged
rajarsheechatterjee merged 1 commit intoOct 24, 2026
Conversation
[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
SummaryUpdates
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); |
There was a problem hiding this comment.
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
approved these changes
Oct 24, 2026
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.
Fixes the search on Light Novel Translations (v1.0.1 -> 1.0.2).
What was wrong:
?search=, but the site's search box submitsfield-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.What changed:
field-searchand paginates the same way browse does.Testing:
Closes #2736