# cxyz Android (Flutter) On-device manga/comic reader/downloader — Flutter reimplementation of [cxyz](../) adapters for Android. ## Features (v1) - **Catalog**: source picker → per-source menus (not one shared tab bar) - **Sources** (build-time): ComicLand, MangaRead, and/or MangaTown via `--dart-define=SOURCES=…` (or `SOURCES=all`) - **Series**: chapter list, sync, multi-select / download-all (unread filter) - **Reader**: gapless vertical webtoon + horizontal paged mode; progress + star - **Library**: starred series only; **History**: recently read - **Downloads**: running job + queue link; CBZ under public `Download/Comics/` - **Settings**: RTL + WebDAV sync (progress, library, history) ## Stack Flutter 3 · Riverpod · go_router · Dio · Drift (SQLite) · archive (CBZ) · cached_network_image · html ## Setup Use a local Flutter SDK (this repo may use `../.tools/flutter-sdk` on the machine that cloned it): ```bash export PATH="/Users/Shared/LocalData/Projects/cxyz/.tools/bin:/Users/Shared/LocalData/Projects/cxyz/.tools/flutter-sdk/bin:$PATH" export CI=true BOT=true cd cxyz-android flutter pub get dart run build_runner build --delete-conflicting-outputs flutter run ``` Sideload APK only (not Play Store–friendly). ## Build-time sources (`SOURCES`) Compile with Flutter `--dart-define`. Unset / invalid → **ComicLand only** (not all sources). Prefer the helper (copies a tagged filename and prints the path): ```bash ./scripts/build_apk.sh # → …/cxyz-comicland-release.apk ./scripts/build_apk.sh mangaread # → …/cxyz-mangaread-release.apk ./scripts/build_apk.sh comicland,mangaread # → …/cxyz-comicland-mangaread-release.apk ./scripts/build_apk.sh all # → …/cxyz-all-release.apk ./scripts/build_apk.sh mangaread --debug # → …/cxyz-mangaread-debug.apk ``` Or call Flutter directly (always writes `app-release.apk` / `app-debug.apk`): ```bash flutter build apk flutter build apk --dart-define=SOURCES=mangaread flutter build apk --dart-define=SOURCES=comicland,mangaread,mangatown flutter build apk --dart-define=SOURCES=all flutter run --dart-define=SOURCES=all ``` With two or more sources enabled, Catalog opens a **source picker**; each source shows only its own menus (e.g. ComicLand: Newest / Popular / …; MangaRead: Latest / Search; MangaTown: Latest / Hot / Directory / …). A single-source build skips the picker and opens that source’s home. ## ComicLand API Base: `https://api.comicland.org/api` | Endpoint | Use | |---|---| | `GET /comics/popular` | Popular shelf | | `GET /comics?offset&limit` | Latest / browse | | `GET /comic/search?q&offset&limit` | Search | | `GET /comic/detail?slug=` | Series + chapters | | `GET /chapter/pages_by_index?slug&index` | Page image URLs | CDN images need Referer/Origin `https://comicland.org/`. ## MangaRead (HTML / Madara) Origin: `https://www.mangaread.org/` - Series: listing HTML `li.wp-manga-chapter`, fallback `POST …/ajax/chapters/` - Pages: chapter HTML with mobile UA → `img.wp-manga-chapter-img` - Catalog: Latest (`/manga/?m_orderby=latest`) + Search (`?s=&post_type=wp-manga`) - Cloudflare: direct Dio only; HTTP 403 surfaces a clear error (no FlareSolverr on phone) ## MangaTown (HTML / mobile) Origin: `https://m.mangatown.com` - Catalog: Latest (`/latest`), Hot (`/hot`, `?tviews.za` / `?wviews.za` / `?mviews.za`), Directory (`/directory/{demo}-{genre}-0-{status}-{letter}-0`), Search (`/search?name=`) - Series: `/manga/{slug}` → `ul.detail-ch-list` - Pages: one image per reader page (`#viewer img#image`); page N at `/manga/{slug}/c005/N.html` - CDN images need Referer `https://m.mangatown.com/`