Chinese Language Extensions
Overview
src/zh/ contains the Chinese-language extension modules. Each immediate child directory is one Android extension project with a build.gradle.kts, launcher resources, and usually Kotlin sources under src/eu/kanade/tachiyomi/extension/zh/<module>/. The Gradle files declare the user-facing source name, lang = "zh", content warning, source ID/base URL or mirrors, optional deeplink paths, and whether the project is backed by a shared multisrc theme. For example, src/…/build.gradle.kts is a config-only Kei source with deeplinks for /manhua-..* and /view-..*, while src/…/build.gradle.kts declares theme = "madara" and the Kotlin class in src/…/Bakamh.kt only supplies site-specific overrides.
Most custom providers are @Source abstract class ... : KeiSource() implementations. They implement the same source lifecycle: list pages (getPopularManga, getLatestUpdates, getSearchMangaList), detail/chapter refresh (fetchMangaUpdate), reader pages (getPageList), filter construction, and optional URL routing through getMangaByUrl, getMangasByUrl, or fetchBaseUrls. State is normally in Tachiyomi/Mihon models (SManga, SChapter, Page) and Android SharedPreferences for configurable login, filtering, mirror, or content settings.
Directory/module organization
- src/…/build.gradle.kts is the routing and packaging entry for every extension. It is the fastest place to determine whether a provider is standalone (
libVersion,source { ... }only) or multisrc-backed (theme = "mccms","goda","madara","sinmh","dm5","mmlook","manga18", etc.). Config-only providers may have little or no Kotlin beyond generated/common code, while customized providers add Kotlin under the same module directory. - Standalone providers keep DTOs, filters, interceptors, and preference helpers inside their module: examples include src/…/Zaimanhua.kt plus ZaimanhuaDto.kt, Filter.kt, and CommentsInterceptor.kt; src/…/Picacomic.kt plus API DTO/filter helpers; and src/…/BookWalkerTaiwan.kt plus WafInterceptor.kt, Dto.kt, and filters.
- Multisrc providers import
eu.kanade.tachiyomi.multisrc.*classes and override only the behavior their site deviates on. src/…/Rumanhua.kt simply enablesuseLegacyMangaUrlonMMLook; src/…/Dm5.kt and src/…/JisuManhua.kt are thin DM5 wrappers; src/…/Bakamh.kt customizes Madara selectors, date formats, throttling, and lock handling. - Some modules use shared library helpers rather than a full theme. src/…/BookWalkerTaiwan.kt uses
keiyoushi.lib.publus.PublusInterceptorandfetchPagesfor the BOOK☆WALKER viewer, while script/page decoders in providers such as src/…/Manhuagui.kt, src/…/Mangabz.kt, and src/…/Manben.kt use unpacking helpers fromkeiyoushi.lib.unpackerorkeiyoushi.lib.lzstring.
Common source implementation patterns
- HTML catalogue providers fetch documents with
Fetch.DOCUMENT, parse cards with Jsoup, and returnMangasPage. src/…/Zerobyw.kt lists cards froma[href*=/details/?kuid=], maps chapters fromdiv.grid a[href*=/view/index.php], and strips comment-count decorations from titles. src/…/Longjinman.kt builds/bookcata/.../page/<n>and/search/.../page/<n>URLs, then parses.module-poster-item,.module-info-main, and#m_r_imgbox_0 img[data-src]. - JSON/API providers construct API URLs or JSON POST bodies, deserialize DTOs, and use frontend URLs only for user-visible links. src/…/Zazhimi.kt uses
https://android2026.zazhimi.net/api, exposes a single全本chapter, and marks detailsONLY_FETCH_ONCE. src/…/Utifa.kt posts to/api/manga/common/list, fetches category data from/api/manga/common/categoryTree, and re-signs image URLs after 403 responses because chapter page links expire after about 30 minutes. - Authenticated/configurable providers implement
ConfigurableSourceand install request interceptors. src/…/Picacomic.kt signs Pica API requests with HMAC headers, stores login token/channel/image-quality/blocklist preferences, refreshes tokens on 401, and can route favourites via a filter. src/…/Zaimanhua.kt stores username/password/token preferences, retries chapter/image requests with auth headers, and optionally appends a chapter comments page. src/…/NoyAcg.kt uses a session cookie jar and synchronized login retry when an API response indicates login is required. - Mirror/domain discovery appears where source domains rotate. src/…/Zerobyw.kt fetches the current base URL from
https://stevenyomi.github.io/source-domains/zerobyw.txt; src/…/WNACG.kt merges a remote domain list with hard-coded unlisted mirrors and rate-limits mirror hosts; src/…/ManwaManhua.kt decodes candidate domains fromhttps://mwmw.cc/and selects the first one whose/checkendpoint answers; src/…/Longjinman.kt reads backup domains from footer friend links. - Page protection/decoding is usually localized in the provider. src/…/ManwaManhua.kt decrypts
/en_images/responses withaesDecryptWithPrependedIv; src/…/Miaoqu.kt base64-decodes and XORsvar DATAusing a chapter-ID-derived key; src/…/Roumanwu.kt installsScrambledImageInterceptorand falls back from Next.js data to TanStack hydration strings when parsing page URLs. - Dynamic filters often use
supportsFilterFetching. src/…/Vomic.kt fetches category IDs from/c/getCatListbefore buildingCategoryFilter; src/…/BikaManhua.kt reads genres from/category/; src/…/ManwaManhua.kt scrapes tag slugs from/cate/; src/…/Utifa.kt turns API category tree entries into sort/category filters.
Notable provider/template families
- MCCMS family: src/…/TibiuComics.kt, src/…/BikaManhua.kt, src/…/SixMH.kt, src/…/Miaoqu.kt, src/…/Manhuawu.kt, and src/…/ManhuaManga.kt use
eu.kanade.tachiyomi.multisrc.mccms. The web/mobile split matters:MCCMSWebproviders frequently override mobile/PC headers, listing selectors, filter fetching, and page decoders, while API-backedMCCMSproviders may override search/detail because the common API cannot handle site-specific behavior. src/…/TibiuComics.kt disables category-page filters, looks up names viacomicinfo, and fetches pages fromindex.php/api/data/pic; src/…/BikaManhua.kt serializes text searches with a mutex because the site returns “搜索繁忙” when Mihon asks pages too quickly. - GoDa/Baozimh family: src/…/build.gradle.kts declares
theme = "goda"with several mirrors and a fixed source ID. src/…/GoDaManhua.kt overrides the shared GoDa chapter and page APIs to useapi-get-v3.mgsearcher.com, decodes encrypted image metadata, and converts 404/removed manga into migration/removal messages. src/…/EighteenManhua.kt also imports the GoDa multisrc theme. - Madara/MMlook/SinMH/DM5/Manga18 thin wrappers: src/…/Bakamh.kt is a Madara customization with request throttling and lock-page errors. src/…/Rumanhua.kt and src/…/Dumanwu.kt use MMLook; src/…/JiuerManhua.kt, src/…/JiulingManhua.kt, and src/…/YKMH.kt use SinMH; src/…/Dm5.kt and src/…/JisuManhua.kt use DM5; src/…/HANMAN18.kt uses Manga18. For these paths, source behavior mostly lives in the shared multisrc template, and local Kotlin should be checked for overrides before assuming the template defaults.
- Commercial/reader-backed providers: src/…/BookWalkerTaiwan.kt treats product, serial, search-series, and browser-viewer URLs as different routes to a manga/series, uses a WAF interceptor and rate-limited search, extracts product data from
#app[data-page], and fetches protected pages through Publus content APIs. src/…/Tongli.kt and src/…/Toptoon.kt are API/DTO-oriented commercial-style providers with their own response models. - Adult/auth-heavy API providers: src/…/Picacomic.kt, src/…/WNACG.kt, src/…/NoyAcg.kt, src/…/ManwaManhua.kt, and src/…/Vomic.kt combine preferences, mirrors, login/session handling, blacklist or content-type preferences, and API-specific headers/signatures. Changes in these modules often affect interceptors and preference migration as much as parsing.
Routing guidance for src/zh paths
- Route src/…/build.gradle.kts changes to this doc because the Gradle block defines the source name, language, source ID, base URL/mirrors, content warning, deeplink paths, lib version, and multisrc theme for the provider.
- Route src/…/<Provider>.kt to the provider’s runtime behavior: listing/search, detail/chapter refresh, URL import/deeplink handling, page loading, base URL discovery, interceptors, and preferences.
- Route src/…/Filters.kt or Filter.kt with the owning provider, because filters are parsed directly by
getSearchMangaList; query-vs-filter precedence is source-specific, as seen in src/…/Zerobyw.kt, src/…/Zazhimi.kt, and src/…/Zaimanhua.kt. - Route src/…/Dto.kt, *Dto.kt, Response.kt, and decoder helpers with their provider. DTO shape changes feed parse calls in the provider class and can silently break API flows.
- Route src/…/*Interceptor.kt, cookie jars, signers, and WAF/session helpers with their provider. These files usually control auth, anti-bot, image retry/decryption, or page availability (
Zaimanhuacomments/image retry,Vomicrequest signing,BookWalkerTaiwanWAF/Publus,NoyAcgsessions). - Treat res/…/ic_launcher.png changes as provider metadata/icon-only unless paired with Kotlin or Gradle changes.
Path-routable coverage notes
- src/…/build.gradle.kts: extension packaging metadata, source IDs, base URLs/mirrors, content warnings, deeplinks, and multisrc theme declarations for all Chinese providers.
- src/…/*.kt: standalone source implementations, multisrc overrides, DTOs, filters, interceptors, preference screens, URL import/deeplink handlers, API clients, page parsers, and site-specific decoding/signing logic.
src/zh/**/res/**: extension-owned resources such as launcher icons; these do not change runtime parsing unless accompanied by Gradle/source changes.
Coupling
- If a
theme = ...value in src/…/build.gradle.kts changes, verify the Kotlin class insrc/zh/<provider>/src/**still extends the matching multisrc base. For example, src/…/build.gradle.kts declaresmadaraand src/…/Bakamh.kt extendsMadara; src/…/build.gradle.kts declaresmccmsand src/…/TibiuComics.kt extendsMCCMS. - If filters change, verify
getSearchMangaListindexes or type lookups are updated in the same provider. src/…/Zazhimi.kt indexesfilters[1]andfilters[2]; src/…/Vomic.kt switches on filter classes; src/…/Zaimanhua.kt relies onfirstInstanceOrNullfor ranking, genre, and search-by-ID behavior. - If DTO fields or endpoint URLs change, update both the DTO file and the provider parse call. Examples include src/…/ZaimanhuaDto.kt consumed throughout Zaimanhua.kt, src/…/Dto.kt consumed by Picacomic.kt, and src/…/Dto.kt consumed by BookWalkerTaiwan.kt.
- If URL routing or mirrors change, verify both user-visible URL builders and import handlers. src/…/BookWalkerTaiwan.kt handles
/search?series=,/serial/,/product/, and/browserViewer/; src/…/Picacomic.kt maps/comic/<id>and/comic/reader/<id>/...; src/…/ManwaManhua.kt accepts selected live hosts plus known mirrors. - If an interceptor is changed, verify the request tags/fragments or headers that trigger it. src/…/Zaimanhua.kt appends JSON retry fragments to image URLs and sets
IMAGE_RETRY_FLAG; src/…/Utifa.kt stores the chapter ID in the image URL fragment for re-signing; src/…/Vomic.kt installsSignInterceptorfor the API host.
Risks
- src/…/Picacomic.kt: API requests depend on exact mobile headers, HMAC input, nonce/time fields, channel DNS, and token refresh. If any signed header,
Content-Type, or URL path normalization changes, the API can reject every listing/detail/page request or fail login refresh. - src/…/Zaimanhua.kt: the auth interceptor conditionally retries PC and H5 chapter APIs with bearer tokens and image retry depends on URL fragments. If request headers/fragments are stripped or token validity parsing changes, paid/hidden chapters can appear empty or images can stay broken after cached URLs expire.
- src/…/BookWalkerTaiwan.kt: page loading depends on WAF handling, a viewer redirect, parsing js/config.js for
serverDomain, and Publus auth. If the viewer route or config regex drifts, details may still parse butgetPageListreturns an empty list for protected books. - src/…/ManwaManhua.kt: the selected live domain is discovered from base64-encoded address-page content and image responses under
/en_images/are decrypted by an interceptor. If the address page format,/checkmarker, or image encryption key changes, startup can find no base URL or pages can download unreadable encrypted data. - src/…/Miaoqu.kt and src/…/SixMH.kt: reader pages decode obfuscated payloads (
var DATAXOR/base64 for Miaoqu,params = '<base64>'for SixMH). If the obfuscation marker or key schedule changes, listings/details may continue to work while all chapter pages fail.