-
Notifications
You must be signed in to change notification settings - Fork 378
fix: update Anime Anyway for current site schema #2570
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
pdmacinnes
wants to merge
4
commits into
lnreader:master
Choose a base branch
from
pdmacinnes:feat/anime-anyway-plugin
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+84
−16
Open
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
16337a7
feat: add Anime Anyway plugin (english)
pdmacinnes 618c992
fix: expose each Anime Anyway volume as its own novel
pdmacinnes 1dba72b
fix: update Anime Anyway volume parsing
pdmacinnes 96565a2
chore: sync Anime Anyway branch with upstream
pdmacinnes File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Let's remove this. |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,36 @@ | ||
| # Anime Anyway site-schema fix | ||
|
|
||
| ## Requirements & Goals | ||
|
|
||
| - Restore Anime Anyway support in LNReader after the site changed its volume-page payload shape. | ||
| - Allow the new `Nibunnoinochi` volume and its first chapter to appear, open, and render in LNReader. | ||
| - Preserve compatibility with existing Anime Anyway volumes and the previous payload shape where practical. | ||
| - Keep the adapter's existing one-novel-per-volume catalogue behavior. | ||
|
|
||
| ## Inputs, Outputs & Behavior | ||
|
|
||
| - Read the homepage `__NEXT_DATA__` catalogue, including the current `displayTitle` and `releaseDate` fields when present. | ||
| - Read volume pages from either the legacy `pageProps.vol` location or the current `pageProps.volumeProps.vol` location. | ||
| - Use the series title and volume display title to create a distinct, searchable LNReader novel name. Continue recognizing legacy `Year N Vol. M` titles. | ||
| - Use the normalized volume payload to populate the novel cover, synopsis, status, and ordered chapter list. | ||
| - Continue reading chapter content from `pageProps.chapter` and resolving chapter URLs using the site's real path format. | ||
| - Use homepage release dates for latest sorting and fall back to volume-page release dates when the homepage omits them. | ||
|
|
||
| ## Edge Cases & Error Handling | ||
|
|
||
| - A missing or malformed volume payload must keep the existing unavailable-novel response rather than throwing. | ||
| - A volume with no `displayTitle` must still use its legacy title correctly. | ||
| - A legacy page with only `pageProps.vol` must continue to parse. | ||
| - Missing covers, synopsis, release dates, or chapter arrays must use the adapter's existing defaults and empty results. | ||
| - Unknown Portable Text block types must remain safely ignored. | ||
| - The adapter must not merge distinct volumes or construct synthetic paths. | ||
|
|
||
| ## Acceptance Criteria | ||
|
|
||
| - [ ] `popularNovels(1, ...)` includes `Nibunnoinochi` Volume 1 with path `nibunnoinochi/v1` and a useful distinct name. | ||
| - [ ] `searchNovels('Nibunnoinochi', 1)` returns the new volume. | ||
| - [ ] `parseNovel('nibunnoinochi/v1')` returns the new volume name, cover, synopsis, and one chapter named `Prologue: The Place Where I’m to Die`. | ||
| - [ ] `parseChapter('nibunnoinochi/v1/prologue')` returns rendered content longer than the live-check minimum. | ||
| - [ ] An existing volume such as `y3v4` still returns its full chapter list and latest sorting remains functional. | ||
| - [ ] Type-checking, linting/format checks, and the live plugin check pass. | ||
| - [ ] The final change is committed with a conventional commit message and prepared for the repository's normal pull-request workflow. |
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The series-prefixed path depends on
seriesUsesRootPathbeing exactlyfalse, but no fixture-backed test checks that the catalogue producesnibunnoinochi/v1. The newvolumeProps.volparsing branch is untested too. Tests for both payload shapes and routes would catch a site-data mismatch that lint and type-checking cannot.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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. This repository has no dedicated unit-test or fixture harness; its documented validation is the live plugin check. I verified the new nibunnoinochi/v1 route and both payload handling paths against the live site successfully. Fixture coverage could be added separately if the project adopts a test framework.