Skip to content

fix(foxaholic): handle volume-grouped chapter lists in madara template (v2.2.2) - #2663

Open
7ui77 wants to merge 2 commits into
lnreader:masterfrom
7ui77:fix/foxaholic-volume-chapters
Open

7ui77 wants to merge 2 commits into
lnreader:masterfrom
7ui77:fix/foxaholic-volume-chapters

Conversation

@7ui77

@7ui77 7ui77 commented Oct 10, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Handle volume-grouped chapter lists in Madara template: On sites like Foxaholic, novels with volumes or story arcs (such as Strange Grief Wants to Retire The Weakest Hunter Dreams of a Hero) group chapters inside <li class="parent has-child"> volume containers. The volume groups appear in ascending order on the page, while chapters inside each volume are displayed in descending order. Previously, applying chapters.reverse() unconditionally across the flat list inverted the volume order, causing the latest arc (Arc 11) to appear at the very start of the chapter list in the app, with chapter [Source Request] Novefull #1 incorrectly assigned to chapter 467.1.
  • Updated parseNovel in MadaraPlugin to detect volume group containers (ul.main > li.has-child, ul.main > li.parent). When present, chapters within each volume are reversed individually and appended in volume order, ensuring correct chronological reading order from the beginning.
  • Preserved standard flat chapter reversal when volume containers are absent, maintaining full backward compatibility with other Madara sources.
  • Prevented overwriting loadedCheerio when AJAX chapter requests return empty responses or lack .wp-manga-chapter elements.
  • Cleaned up element class check using loadedCheerio(element).hasClass('premium-block').
  • Bumped Foxaholic version code to 2.2.2.

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 #)
  • Commit messages follow type(scope): description (e.g. feat(<generator>): add new source)

Results

  • Sample tested: Strange Grief Wants to Retire The Weakest Hunter Dreams of a Hero on Foxaholic (921 chapters across 12 Arcs).

  • Result: Chapters correctly order from [Short Story] SS1 / [Arc 1] 1-23 through to [Arc 11] 500.1.
    Screenshot_2026-10-10-19-25-44-724_com.rajarsheechatterjee.LNReader.jpg
    Screenshot_2026-10-10-19-42-48-457_com.rajarsheechatterjee.LNReader.jpg

  • Repo test link:

https://raw.githubusercontent.com/7ui77/lnreader-plugins/refs/heads/plugins/v3.0.0/.dist/plugins.min.json

@greptile-apps

greptile-apps Bot commented Oct 10, 2026 •

Copy link
Copy Markdown

RetriggerConfidence Score: 4/5

[Medium impact] Refactors chapter parsing for volume-grouped layouts.

Preserve standalone chapters alongside volume groups before merging.

Findings

  1. P1 Standalone chapters disappear ▶
  2. P2 Hidden chapters change later numbers ▶

Summary

The PR fixes Foxaholic’s volume ordering and bumps its version to 2.2.2.

  • Foxaholic chapters now follow reading order across volume groups.
  • The parser keeps its current chapter data when an AJAX reply has no chapters.

Reviews (1) · Last reviewed commit: "fix(madara): handle volume-grouped chapt..." · Reviewed by Greptile

Comment thread plugins/multisrc/madara/template.ts Outdated
Comment thread plugins/multisrc/madara/template.ts Outdated

This branch has not been deployed

No deployments
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.

1 participant