Skip to content

Add TruyenSS source with chapter loading and genre filters#2192

Merged
K1ngfish3r merged 13 commits into
lnreader:masterfrom
ganzvu:master
May 18, 2026
Merged

Add TruyenSS source with chapter loading and genre filters#2192
K1ngfish3r merged 13 commits into
lnreader:masterfrom
ganzvu:master

Conversation

@ganzvu
Copy link
Copy Markdown
Contributor

@ganzvu ganzvu commented May 15, 2026

Checklist

  • Update version code if an existing plugin was modified
  • Test changes in Plugin Playground or the app
  • Reference related issues in the PR body (e.g. Closes #xyz)
  • Add a new plugin for a Vietnamese source Truyenss.com

Copilot AI review requested due to automatic review settings May 15, 2026 17:12
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

Copy link
Copy Markdown
Collaborator

@K1ngfish3r K1ngfish3r left a comment

Choose a reason for hiding this comment

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

Please remove the samples and note in README.md

Comment thread plugins/vietnamese/truyenss.ts Outdated
Comment thread plugins/vietnamese/truyenss.ts Outdated
Comment thread plugins/vietnamese/truyenss.ts Outdated
Comment thread README.md Outdated
Comment thread plugins/vietnamese/truyenss.ts Outdated
@ganzvu
Copy link
Copy Markdown
Contributor Author

ganzvu commented May 18, 2026

@K1ngfish3r Cursor agent had commited the changes per your request, I will test it on the app before we can merge

@ganzvu
Copy link
Copy Markdown
Contributor Author

ganzvu commented May 18, 2026

@K1ngfish3r I was having trouble with scraping the thumbnails, but it have been resolved and verified to be working in the app.

Thanks for the review, sorry for the whole process being messy, I am still learning GitHub :)

@K1ngfish3r
Copy link
Copy Markdown
Collaborator

fix conflicts pls ye, have this PR been rebased on latest master?

Implements novel pages, hash-style chapter list, POST chapter loader
(/layout/xem-chuong.php), genre filters for popular listings, and
multi-pattern search. Includes saved HTML fixtures used for selectors.
TruyenSS loads chapters with jQuery $.ajax, which defaults to GET.
POST to xem-chuong.php returns an empty body, causing empty chapter
errors in the app while WebView (GET + hash) still worked.

Bump plugin version to 1.0.1.
Remove README note and truyenss HTML fixtures. Drop unused resolveUrl and
full-URL handling in parseNovel. Use defaultCover for listing items and when
novel page has no cover image.
… URL

LNReader applies plugin Referer headers to browse tiles; external blob
placeholders can fail. List layout omits defaultCover when cover is unset.
Prefer real listing images; use raw GitHub placeholder URL aligned with the app.
Genre/search cards put the thumbnail in col-2 beside the stretched link,
not inside the anchor. Image src uses ../user-upload/... which must be
resolved against the list page URL. Use the site no_avatar.jpg placeholder
so browse tiles load with the plugin Referer.
@ganzvu
Copy link
Copy Markdown
Contributor Author

ganzvu commented May 18, 2026

@K1ngfish3r Done, thanks again

@K1ngfish3r
Copy link
Copy Markdown
Collaborator

not bad, not bad. everything is functional. minor nit

image

This summary looks like a big blob on webtest

image

Should look normal like on the website

@K1ngfish3r
Copy link
Copy Markdown
Collaborator

since summary is just a text string which doesnt render html, will have to convert summary text to use \n and such. There are a few examples on this repo, probably just search for summary and \n

- Parse playground: normalize CR/LF and stray spaces; use whitespace-pre-line,
  max-w-prose, leading-7, break-words, explicit font-sans for robust wrapping
  when webfonts misbehave.
- TruyenSS: preserve <br>/<p> structure like novelfire (join with newlines)
  instead of collapsing the whole intro to one line.
zstdDecompressSync is not exported from zlib on Node versions before it was
added. Importing it at load time broke vite.config (and the dev server)
with SyntaxError. Only call zstd at runtime when content-encoding is zstd
and throw a clear error if the runtime lacks support.
@K1ngfish3r
Copy link
Copy Markdown
Collaborator

erm, please keep parsenovel.tsx changes in a separate PR. keep within scope ya
image
looking good

- Reconstruct target URL when the dev server path is /https://... (from
  window.fetch prefixing localhost); the old  + path form produced
  an invalid URL and broke all proxied plugin requests.
- Only open a browser when VITE_OPEN=true so missing xdg-open does not error.
@ganzvu
Copy link
Copy Markdown
Contributor Author

ganzvu commented May 18, 2026

Cursor is bugging out and keep pushing commits that are out of scope, the problem was the testing env not having the correct version of Nodejs, so it freaked out and blame the code.

sorry about that.

@K1ngfish3r
Copy link
Copy Markdown
Collaborator

no prob, lemme know when ready

@ganzvu
Copy link
Copy Markdown
Contributor Author

ganzvu commented May 18, 2026

Should be ready, can you help me review it once more?

I am at work and is running the agents passively, so if there is any more major issues I will fix it by hand later.

Thanks

@K1ngfish3r
Copy link
Copy Markdown
Collaborator

keep parse-novel.tsx change in a separate PR

Restore src/components/parse-novel.tsx to pre-093668b state; TruyenSS
summary parsing in the plugin is unchanged.
@ganzvu
Copy link
Copy Markdown
Contributor Author

ganzvu commented May 18, 2026

keep parse-novel.tsx change in a separate PR

Done, I really thought i did haha. Thanks!

@K1ngfish3r K1ngfish3r merged commit 76d60d0 into lnreader:master May 18, 2026
1 check passed
nofzo pushed a commit to nofzo/lnreader-plugins that referenced this pull request May 22, 2026
* Add TruyenSS Vietnamese source for truyenss.com

Implements novel pages, hash-style chapter list, POST chapter loader
(/layout/xem-chuong.php), genre filters for popular listings, and
multi-pattern search. Includes saved HTML fixtures used for selectors.

* fix(truyenss): fetch chapter HTML via GET like the site

TruyenSS loads chapters with jQuery $.ajax, which defaults to GET.
POST to xem-chuong.php returns an empty body, causing empty chapter
errors in the app while WebView (GET + hash) still worked.

Bump plugin version to 1.0.1.

* fix(truyenss): address PR review — version 1.0.0, defaultCover, cleanup

Remove README note and truyenss HTML fixtures. Drop unused resolveUrl and
full-URL handling in parseNovel. Use defaultCover for listing items and when
novel page has no cover image.

* fix(truyenss): browse list covers — scrape thumbs, stable placeholder URL

LNReader applies plugin Referer headers to browse tiles; external blob
placeholders can fail. List layout omits defaultCover when cover is unset.
Prefer real listing images; use raw GitHub placeholder URL aligned with the app.

* fix(truyenss): resolve listing covers (.card sibling img, ../ URLs)

Genre/search cards put the thumbnail in col-2 beside the stretched link,
not inside the anchor. Image src uses ../user-upload/... which must be
resolved against the list page URL. Use the site no_avatar.jpg placeholder
so browse tiles load with the plugin Referer.

* fix(playground): readable novel summary + TruyenSS paragraph breaks

- Parse playground: normalize CR/LF and stray spaces; use whitespace-pre-line,
  max-w-prose, leading-7, break-words, explicit font-sans for robust wrapping
  when webfonts misbehave.
- TruyenSS: preserve <br>/<p> structure like novelfire (join with newlines)
  instead of collapsing the whole intro to one line.

* fix(proxy): avoid static zstd import so Vite starts on older Node

zstdDecompressSync is not exported from zlib on Node versions before it was
added. Importing it at load time broke vite.config (and the dev server)
with SyntaxError. Only call zstd at runtime when content-encoding is zstd
and throw a clear error if the runtime lacks support.

* fix(proxy): correct decompress error message for zstd

* Revert "fix(proxy): correct decompress error message for zstd"

This reverts commit ab5c4f0.

* Revert "fix(proxy): avoid static zstd import so Vite starts on older Node"

This reverts commit 58ddf6c.

* fix(dev): proxy URL for https targets + disable auto-open by default

- Reconstruct target URL when the dev server path is /https://... (from
  window.fetch prefixing localhost); the old  + path form produced
  an invalid URL and broke all proxied plugin requests.
- Only open a browser when VITE_OPEN=true so missing xdg-open does not error.

* Revert "fix(dev): proxy URL for https targets + disable auto-open by default"

This reverts commit b0de564.

* revert: drop out-of-scope parse-novel playground summary changes

Restore src/components/parse-novel.tsx to pre-093668b state; TruyenSS
summary parsing in the plugin is unchanged.

---------

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
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.

4 participants