Introducing a new way to review your PRs.

Read the announcement

keiyoushi / extensions-source

Source code of extensions in https://github.com/keiyoushi/extensions

View on GitHub

13 documents · Updated Nov 19, 2026

docs / english-language-extensions

English Language Extensions

Overview

src/en/** is the English extension collection. Each immediate child of src/en/ is an independently packaged Tachiyomi/Keiyoushi source with its own build.gradle.kts, icon resources, and Kotlin package under src/eu/kanade/tachiyomi/extension/en/<source>/. The Gradle metadata is part of the routing surface: for example src/…/build.gradle.kts declares the display name, lang = "en", source baseUrl, versionCode, optional contentWarning, and theme = "madara"; the Kotlin class in src/…/Zinmanga.kt is then only a small @Source wrapper over the shared Madara implementation.

The collection mixes two implementation styles:

Most modules follow the same local file layout: the main source class owns the network flow, Filters.kt maps UI filters to URL/query parameters, and Dto.kt models JSON or embedded app-state responses. The source class is the path-routable entry point for review: if a src/…/<Source>.kt file changes, it usually affects runtime behavior; if only Filters.kt changes, inspect the URL-building contract in the adjacent source class; if Dto.kt changes, inspect the parse call sites in that same module.

Directory and module organization

Every source module lives under src/en/<id>/. build.gradle.kts files decide whether the source is standalone or backed by a shared lib-multisrc template via theme = "...". The dominant template families in the English tree include Madara (src/…/build.gradle.kts with src/…/Zinmanga.kt), MangaThemesia, MangaCatalog (src/…/TowerOfGodMangaOnline.kt), Keyoapp (src/…/WriterScans.kt), MangaHub, Yiimanga/Yiimadara (src/…/YaoiScanMe.kt), Iken, VineTheme, MangaBox (src/…/Mangakakalot.kt), and smaller families such as WPComics (src/…/XoxoComics.kt). Modules without a theme line generally implement KeiSource directly.

The Kotlin package mirrors the module id: src/…/ZipComic.kt declares package eu.kanade.tachiyomi.extension.en.zipcomic. Generated source discovery depends on the @Source annotation on the abstract source class, as seen in src/…/ZipComic.kt, src/…/WeebCentral.kt, and the template-backed wrappers such as src/…/Zinmanga.kt.

Icon resources under each module's res/mipmap-* directories are package assets, not source behavior. The behavior for a source is normally in the module's src/**.kt files plus its build.gradle.kts metadata.

Common source implementation patterns

The standard source contract is visible in src/…/ZipComic.kt: getPopularManga, getLatestUpdates, and getSearchMangaList build list pages; getMangaByUrl accepts deep links and normalizes them to stored SManga.url; fetchMangaUpdate returns SMangaUpdate with details and chapters; getPageList returns image Pages; getFilterList delegates to the adjacent Filters.kt. ZipComic is HTML-first: it fetches documents with Fetch.DOCUMENT, parses with Jsoup selectors, converts relative dates locally, and exposes list deep links for /genre, /status, /author, /artis, and /search via getMangasByUrl.

API-backed standalone sources keep the same public contract but swap HTML selectors for JSON DTOs. src/…/WebNovel.kt uses WebNovel API endpoints for browse/search/details/chapter pages and stores chapter identity as comicId:chapterId. src/…/VoyceMe.kt posts GraphQL bodies to https://hasura.voyce.me/v1/graphql for popular/latest/search/details/pages, then serves images from a CloudFront static URL with a referer-aware image request. src/…/WarForRayuba.kt is an external-content bridge: popular entries come from the GitHub contents API for xrabohrok/WarMap, chapters point to Cubari URLs, and page JSON is read with Cubari-specific headers.

Modern web-app sources often extract embedded Next.js, Astro, or JSON-LD state rather than scraping every field from visible HTML. src/…/AsuraScans.kt reads Astro props, calls https://api.asurascans.com/api, keeps random slug data in SManga.memo, and descrambles tiled reader images in an OkHttp interceptor. src/…/WeebCentral.kt lists from /search/data, reads details and related entries from section[x-data], and fetches pages from a chapter /images endpoint. src/…/WebtoonClub.kt combines JSON-LD, Next.js payload extraction, and an /api/comics/{id}/chapters endpoint, storing the numeric comic id in manga memo so chapter fetches do not have to rediscover it.

Filters are usually local Filter subclasses that know how to mutate a URL builder. src/…/Filters.kt defines UriFilter, select filters, checkbox groups, and tri-state include/exclude tag filters; src/…/WeebCentral.kt then applies filters.filterIsInstance<UriFilter>().forEach { it.addToUri(this) }. src/…/Filters.kt uses QueryFilter objects that expose a param and selected value, which ZipComic.kt adds to /search. For sources with dynamic filter values, supportsFilterFetching and fetchFilterData are implemented in the source class: src/…/AsuraScans.kt fetches genres and creator lists, src/…/WebtoonLib.kt fetches type/status/category filters, and src/…/Yurivan.kt fetches tag labels from /tags.

Preferences and memo fields are part of source state. src/…/AsuraScans.kt exposes a Hide premium chapters preference and migrated old preference keys out of shared preferences; it also requires chapter memo data for random slugs and throws refresh-style errors when missing. src/…/WeebCentral.kt exposes title-cleaning preferences. src/…/WebtoonLib.kt exposes Hide adult series, and src/…/WebtoonClub.kt has a default content-rating preference. src/…/Viz.kt uses preferences plus login/subscription checks to hide or mark locked chapters.

Notable provider and template families

Madara-derived modules are the largest template family. Simple wrappers such as src/…/Zinmanga.kt, src/…/YaoiScan.kt, and src/…/WuxiaWorld.kt rely almost entirely on shared Madara behavior. More customized Madara modules override selectors or network behavior: src/…/ZinmangaNet.kt disables post-id support, fetches chapters from /api/comics/{slug}/chapters with paging, rate-limits API calls, and forces a site-root referer for image requests; src/…/Zazamanga.kt changes status/genre selectors, rewrites chapter URLs back to series URLs in getMangaByUrl, caps pagination at page 100, and fetches genre filter data from the search form.

WordPress-like comic templates vary by site. src/…/XoxoComics.kt extends WPComics, changes search/popular/latest paths, handles paginated chapter lists, and works around image requests that return HTTP 404 even when the image body exists. src/…/Mangakakalot.kt extends MangaBox, adds merge/alternate-CDN interceptors from the template, constrains image-heavy dispatch concurrency, and rewrites id-like slugs from titles for migration compatibility.

Single-series or catalog-site wrappers usually override a small subset of a template. src/…/TowerOfGodMangaOnline.kt extends MangaCatalog, hardcodes the single source list entry, extracts chapters with a tower-of-god-chapter- regex, and returns Blogger-hosted page images. src/…/WriterScans.kt only changes the Keyoapp popular selector. src/…/YaoiScanMe.kt only changes the Yiimanga manga path and search parameter.

Large standalone providers tend to be custom because they need site-specific app APIs, access rules, or image handling. src/…/AsuraScans.kt handles Astro data, locked/premium pages, random slugs, API authorization, and tile descrambling. src/…/WebtoonLib.kt handles search access challenges, adult filtering, related manga, soft-sub manifests, and bubble rendering through src/…/BubbleInterceptor.kt. src/…/Viz.kt switches behavior between Shonen Jump and Viz Manga by source name, checks country availability and login/subscription state, and fetches per-page image URLs through /manga/get_manga_url before an image interceptor unscrambles them.

Adult or mature standalone sources often implement list-routing and filter-fetching carefully. src/…/YiffComics.kt has no latest tab, maps artist/tag/orientation/search pages through getMangasByUrl, stores the reader DTO in chapter memo to avoid a second page request, and exposes related manga plus fetched top tags. src/…/Yurivan.kt sets an age_verified=true cookie, reads RSC/Next.js payloads, and maps include/exclude tags into /api/story-feed query parameters.

Routing guidance for src/en paths

  • Route src/…/build.gradle.kts changes to this doc when they alter English source metadata, template family (theme), base URL, language, content warning, or lib version. If the theme value changes, inspect the adjacent Kotlin wrapper because the template import and override set usually need to match.
  • Route src/…/<Source>.kt changes to the specific provider behavior. Template-backed wrappers may look small but can override critical hooks such as selectors, API chapter fetching, image requests, URL migration, preferences, or rate limiting.
  • Route src/…/Filters.kt changes with the adjacent source class. Filters are not standalone: their selected values become query parameters or path segments in methods such as ZipComic.getSearchMangaList, WeebCentral.getSearchMangaList, WebtoonClub.getSearchMangaList, and Yurivan.storyFeed.
  • Route src/…/Dto.kt changes to every parse site in that same module. DTOs commonly define memo payloads and extension methods, so a field rename can affect chapter identity, page extraction, or search pagination without changing the main source class.
  • Route src/…/Interceptor.kt or image helper changes to page/image behavior. Examples include Asura's tiled image interceptor in src/…/AsuraScans.kt, WebtoonLib's bubble drawing in src/…/BubbleInterceptor.kt, and Viz image handling in src/…/ImageInterceptor.kt plus Viz.kt.
  • Ignore src/…/ic_launcher.png for behavioral documentation unless the task is explicitly about packaging assets.

Path-routable coverage notes

This doc owns all paths under src/en/**, but it is intentionally a collection-level map rather than a per-source exhaustive manual. Use it to decide whether a change is template metadata, a simple template override, a standalone scraper/API provider, filter plumbing, DTO parsing, preferences, or image handling.

Representative template-backed coverage includes src/en/zinmanga/**, src/en/zinmanganet/**, src/en/zazamanga/**, src/en/xoxocomics/**, src/en/mangakakalot/**, src/en/writerscans/**, src/en/towerofgodmangaonline/**, and src/en/yaoiscanme/**. Representative standalone coverage includes src/en/zipcomic/**, src/en/asurascans/**, src/en/weebcentral/**, src/en/webnovel/**, src/en/voyceme/**, src/en/vizshonenjump/**, src/en/webtoonclub/**, src/en/webtoonlib/**, src/en/toonhub/**, src/en/yurivan/**, src/en/yiffcomics/**, and src/en/warforrayuba/**.

For a future refresh, do not re-read the whole English tree for an isolated provider change. Open the changed module's build.gradle.kts, changed Kotlin file(s), and only the adjacent Filters.kt/Dto.kt/interceptor files directly referenced by the changed code.

Coupling

  • If theme changes in a file such as src/…/build.gradle.kts, verify the source class import and superclass in the adjacent Kotlin file. A mismatch between Gradle theme = "madara" and a class that imports another eu.kanade.tachiyomi.multisrc.* template will compile or generate source metadata incorrectly.
  • If a filter class changes in src/…/Filters.kt or src/…/Filters.kt, verify the query parameter names consumed by the source class. These filters serialize themselves directly into URLs; there is no shared schema validating that included_tag, status, or genre still matches the website.
  • If memo keys or stored URL formats change in sources such as src/…/AsuraScans.kt, src/…/WebtoonClub.kt, src/…/Yurivan.kt, or src/…/Viz.kt, verify migration behavior for existing library entries. Missing memo values commonly surface as "Refresh chapter list" or migration exceptions rather than as compile errors.
  • If page-image handling changes in src/…/AsuraScans.kt, src/…/WebtoonLib.kt, or src/…/Viz.kt, verify both getPageList/getImageUrl and the OkHttp interceptor path. These sources encode extra image-processing data in URL fragments or memo fields that the interceptor consumes later.
  • If an API DTO changes in src/en/webnovel/**, src/en/voyceme/**, src/en/webtoonclub/**, src/en/webtoonlib/**, or src/en/warforrayuba/**, verify every parseAs, parseGraphQLAs, extractNextJs, or extractNextJsRsc call in that module. DTO fields often control pagination (hasMore, totals), lock state, chapter ids, and image URLs.

Risks

  • src/…/AsuraScans.kt depends on random public slugs and memo-stored slug data. If the slug fallback or preference cleanup is changed without preserving old /series, /comics, and /manga URL formats, existing library entries can stop opening or chapter URLs can throw refresh errors.
  • src/…/WebtoonLib.kt falls back from normal search to challenge access and then to catalogue scanning when the API returns 403/429/503. If that error handling is simplified, text search can silently fail under rate limits or Turnstile enforcement even though browse pages still work.
  • src/…/Viz.kt gates chapters by country, login, and subscription state, then retrieves image URLs page by page. If service-path detection or the /manga/get_manga_url request headers change, users may see locked chapters listed but fail at page load with subscription or regional errors.
  • src/…/Mangakakalot.kt deliberately limits image concurrency and forces connection behavior for very large chapters. Removing those client settings can reintroduce late-chapter stalls or timeouts on image-heavy downloads.