Skip to content

Feat/handle decimal chapters - #28

Merged
EliasLd merged 11 commits into
mainfrom
feat/handle_decimal_chapters
Sep 23, 2026
Merged

EliasLd merged 11 commits into
mainfrom
feat/handle_decimal_chapters

Conversation

@EliasLd

@EliasLd EliasLd commented Sep 23, 2026

Copy link
Copy Markdown
Owner

Add support for decimal chapters and improve range selection

Summary

This PR introduces generic support for decimal chapter numbers and chapter 0 across goweeb's existing providers, improves chapter range selection, and updates the TUI to display long lists of available chapters more clearly.

Changes

Generic chapter numbering

  • Introduce a shared ChapterNumber type in internal/source/common.
  • Support integer and decimal chapter numbers without floating-point precision issues.
  • Normalize chapter numbers, preserving values such as 0, 3.5 and 14.25.
  • Update chapter sorting, deduplication and range filtering to use numeric comparisons.
  • Preserve decimal chapter numbers in PDF filenames, temporary directories and ebook-friendly folders.

Provider integration

  • Update Anime-Sama, MangaDex, Mangavyvy, WeebCentral and MangaFreak to support decimal chapter numbers.
  • Replace integer-only parsing with the shared chapter number parser.
  • Stop skipping decimal chapters such as 3.5 and 14.5.
  • Preserve provider-specific chapter URLs and existing download behavior.

Chapter range selection

  • Extend range parsing to support decimal chapter numbers and chapter 0.
  • Support selections such as 0, 3.5, 1-6.5 and 1-6,6.5,7-10.
  • Include decimal chapters when selecting a range that contains them.
  • Preserve existing multi-range and last-N chapter selection behavior.
  • Display decimal chapters separately between consecutive integer ranges.

TUI improvements

  • Automatically wrap long lists of available chapters according to the terminal width.
  • Keep individual chapter ranges intact when wrapping.
  • Display all available ranges across multiple lines without truncation.
  • Preserve the existing range selection workflow and layout.

Notes

  • Decimal chapters are now supported throughout the discovery, selection and download workflow.
  • MangaDex titles that restart chapter numbering for each volume remain unsupported.
  • Chapters without a numeric identifier require separate handling.

@EliasLd
EliasLd merged commit d96d90c into main Sep 23, 2026
2 checks passed
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