Skip to content

fix(mangadar): support new rows format and iterate all x-data containers - #17804

Open
hamedhani1998 wants to merge 6 commits into
keiyoushi:mainfrom
hamedhani1998:mangadar-only
Open

fix(mangadar): support new rows format and iterate all x-data containers#17804
hamedhani1998 wants to merge 6 commits into
keiyoushi:mainfrom
hamedhani1998:mangadar-only

Conversation

@hamedhani1998

Copy link
Copy Markdown
Contributor

Summary

  • Iterate all div[x-data] containers to find chapter data instead of single selectFirstn- Support new compact array format: ows: [[id, number, url, timestamp], ...]n- Keep legacy chapters: [{...}] format as fallback
  • Add parseRowsJson helper for compact array parsing

yemen added 2 commits July 21, 2026 19:09
- Iterate all div[x-data] instead of single selectFirst
- Support new compact array format: rows: [[id, number, url, timestamp], ...]
- Keep legacy chapters: [{...}] format as fallback
- Add parseRowsJson helper for compact array parsing

@Starmania Starmania left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Please keep the legacy chapters: branch only if you can point at a title that still uses it

MangaDar.kt:221-231, and Dto.kt:22-36

I couldn't find the old format anywhere. Sampled 7 titles spanning 2 to 541 chapters — 877 rows in total:

title chapters format
all-hail-the-sect-leader 541 rows:
blue-box 247 rows:
do-your-best-to-regret 40 rows:
hands-off-my-cleaner 35 rows:
green-skin 10 rows:
bungou-stray-dogs-dazai-wo-hirotta-hi 2 rows:
when-love-calls-upon-me 2 rows:

Every one of those pages has exactly 10 div[x-data], with rows: always in container index 7 and every row of length 5. A \bchapters: search matches nowhere on any of the seven pages.

That makes the legacy branch unreachable, and ChapterDto unreachable with it — Dto.kt:22-36 has exactly one consumer, the parseAs<List<ChapterDto>>() call at :228.

Seven titles is a sample, not a proof, so: if you know of a title that still serves chapters:, name it and the fallback is justified — keep it. Otherwise please delete the legacy branch and ChapterDto along with it. A fallback for a shape that can't be reproduced is speculative, and it's the kind of code that quietly rots. (SearchResponse / SearchMangaItemDto are unaffected.)

Comment thread src/ar/mangadar/src/eu/kanade/tachiyomi/extension/ar/mangadar/MangaDar.kt Outdated
Comment thread src/ar/mangadar/src/eu/kanade/tachiyomi/extension/ar/mangadar/MangaDar.kt Outdated
@hamedhani1998

This comment was marked as spam.

Comment thread src/ar/mangadar/build.gradle.kts Outdated
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.

3 participants