250 Commits

Author SHA1 Message Date
Cuong-Tran
962964d968 StreamWish (extractor): refactor & optimize (#419)
* Using helpers

* Using suspend functions

* lint

* improve handling

* Fix suspend calling sites

* Fix suspend calling sites

* Fix suspend calling sites

* Fix suspend calling sites
2026-06-03 14:45:28 +07:00
IsmaCortGtz
7a4360e344 fix(lib/streamwish-extractor): Fix streamwish-extractor redirections
(cherry picked from commit 110d66c483bd0f14c5e9d8621861a618d8545a9d)
2026-06-03 14:45:28 +07:00
WebDitto
96415b14ea Blogger (extractor): Fix extractor (#380)
* Blogger (extractor): Fix extractor

* refactor with helpers

---------

Co-authored-by: Cuong-Tran <16017808+cuong-tran@users.noreply.github.com>
2026-06-03 01:12:37 +07:00
Cuong-Tran
918c9c786c refactor: using helper methods, improvement & fix bugs 2026-06-03 00:43:45 +07:00
Cuong-Tran
d0c19a96ae Spotless 2026-06-02 23:58:38 +07:00
Cuong-Tran
c2df448810 Fix sync 2026-06-02 23:58:38 +07:00
WebDitto
f449c68f73 Fixed Filemoon extractor
(Kohi-den/extensions-source#1264)

(cherry picked from commit 439bd8e8db66e5cdcec73351e8aaace706007f53)
2026-06-02 23:57:24 +07:00
WebDitto
af972de535 fix(blogger-extractor):Fixed extractor with new format of blogger
(Kohi-den/extensions-source#1233)

(cherry picked from commit e43ba8b9d340a3488bc47959a05d1bda90e7fdf3)
2026-06-02 23:56:45 +07:00
Hayanka
373b5a0ef2 feat(src/lib): Fix polish extension and fix/add lib
(Kohi-den/extensions-source#1208)

* feat(src/lib): Fix polish extension and fix/add lib

* feat(src): ogladajanime remove tabs

* feat(src): ogladajanime remove space

* feat(src): fix filemoon, add filemoon to docchi

(cherry picked from commit ab58b80a1b7b6ac6098dbf708be4a5dea03f00a0)
2026-06-02 23:56:28 +07:00
WebDitto
2e0ea43db9 feat(pt/smartanimes): New source pt/SmartAnimes
(Kohi-den/extensions-source#1152)

(cherry picked from commit 480d49b1cc250f5d172e2d1538f97d7f2085c505)
2026-06-02 23:54:12 +07:00
Cuong-Tran
2dbdab3583 lib: m3u8-server (#398)
* feat: Create a M3U8 server to use a option like skip_initial_bytes of ffmpeg

* Extract headers from the HTTP session

* minor improvement

* early return if data.size < 3 before array access to avoid potential bounds checking overhead in tight loops

* Simplify detection logic

* Only detectSkipBytes over actual bytes read instead of the full buffer

* Use regex for explicit file extension check

* correct readme

* Remove `isInitialized` since it cause unable to start server again after stop

* properly close response to avoid memory leaks

* convert class to object

* Properly working M3U8 Server

* HiAnime fix HD-3 server with M3U8 Server

* Handle relative link

* Refactor m3u8 server package structure and lint

* Refactor M3U8 server components for improved URL handling and code clarity

---------

Co-authored-by: WebDitto <webditto@proton.me>
2026-05-31 15:24:28 +07:00
Cuong-Tran
7295fe5ee7 AnimeStream (multi-src): Refactor & add extractors (#397)
* Use suspend methods
* Use helpers
* AnimeIndo: Avoid crash when initializing filter list
2026-05-30 00:31:05 +07:00
Cuong-Tran
2400ecb1d5 chore: Avoid crash & remove unnecessary libs 2026-05-26 12:28:19 +07:00
Cuong-Tran
5f72f578e7 Fix VidGuard's proguard 2026-05-26 12:11:00 +07:00
manti
e26c465875 utils: update preference util (keiyoushi/extensions-source#16028)
* update preference util

* context

* remove comment

---------

Co-authored-by: AwkwardPeak7 <48650614+AwkwardPeak7@users.noreply.github.com>
(cherry picked from commit fb2f248bcbfdd8df838a3522ada1746483a69a24)
(cherry picked from commit 2e5ab31f0da2a828da6d4b1a6e8cef806f6e49c7)
2026-05-26 09:08:23 +07:00
FourTOne5
ce1d6466bf Rework Gradle build logic (keiyoushi/extensions-source#15657)
* Add new gradle build logic

* rework ko.wolfdotcom

* rework all other extensions

(cherry picked from commit 153fbece55832e8a76f32e26199bb6f8f4252fcb)

---------

Co-authored-by: Cuong-Tran <16017808+cuong-tran@users.noreply.github.com>
(cherry picked from commit b030eeff0bc2e68fff2f070a86c851d950f82145)
(cherry picked from commit d7ba3e81a5a0af9c91d96bee014592e991c4efd9)
2026-05-26 09:08:16 +07:00
manti
f3738c7486 utils: add crypto utils (keiyoushi/extensions-source#15640)
* crypto utils

* Gmanga (multi): decodeHex util

* Madara (multi): decodeHex util

* MangaUp: decodeHex util

* J-Novel: decodeHex util

* Mangago: decodeHex util

* MangasIn: decodeHex util

* ComicFuz: decodeHex util

* Corocoro: decodeHex util

* FlowerComics: decodeHex util

* GorakuWeb: decodeHex util

* KadoComi: decodeHex util

* MangaMee: decodeHex util

* MangaOne: decodeHex util

* Mokuro: decodeHex util

* MeDamTruyen: decodeHex util

* Panomic: decodeHex util

* SoaiCaComic: decodeHex util

* TeamLanhLung: decodeHex util

* TuSachXinhXinh: decodeHex util

* Creativecomic: decodeHex util

* rc4 util

* Comix: rc4 util

* J-Novel: rc4 util

* Revert "Comix: rc4 util"

This reverts commit caff68187c20b119207b9b404ff2d462b87c54c0.

¯\_(ツ)_/¯

(cherry picked from commit 7094076183674480221fa55669e04572145f9d30)
(cherry picked from commit a96c552e11b22ef6bedb34b097de4a101e9455cf)
(cherry picked from commit 3407702c02af5470587c1e311c0c5be40caa9428)
2026-05-26 08:59:31 +07:00
renovate[bot]
4fdd3550ef Update dependency com.android.tools.build:gradle to v9.2.1
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
(cherry picked from commit 083e697607952a3763c5dc32bace837dffbbb67a)
(cherry picked from commit 36df85f7dfbdc924d6364d9a3ddd41e9b13d4de3)
2026-05-26 08:38:26 +07:00
AwkwardPeak7
e6fa155c2b dependency scope fixes and synchrony cleanup (keiyoushi/extensions-source#15477)
* compileOnlyApi

* api

* synchrony: simplify source passing

* bumps due to synchrony change

(cherry picked from commit 84693cab7ba7cc4830a503737498a1b2714f98af)
(cherry picked from commit 3f63cad4e940b0f6f7359bad99c6ab20dedec585)
2026-05-26 08:38:13 +07:00
AwkwardPeak7
373430f9b5 add more helpers to json utils (keiyoushi/extensions-source#15072)
(cherry picked from commit 68aa08b01f90542869f2af6b16c1680732b934f5)
(cherry picked from commit 21e10bd9c46c1e563e2ceaaa805d3f61a6a440a1)
2026-05-26 08:38:01 +07:00
AwkwardPeak7
cf0dee8252 Refactor :lib:randomua to set header in headersBuilder (keiyoushi/extensions-source#14060)
* randomua: set in headers and lint rule

* update randomua usage in sources

* adjust lint rule

* lint errors

* doesn't have randomua in it

* cache useragent response & network on main thread

(cherry picked from commit 3143828aed609f176597ca4ff94d8dce2cf52a0f)
(cherry picked from commit 92643f80e31cea62e4921c2fbbf8b19360e25bc5)
2026-05-26 08:37:17 +07:00
Cuong-Tran
f2af2e647d Move aniyomi.lib.unpacker to keiyoushi.lib.unpacker 2026-05-25 22:37:34 +07:00
Cuong-Tran
58a81c61e3 Move aniyomi.lib.synchrony to keiyoushi.lib.synchrony 2026-05-25 20:43:41 +07:00
Cuong-Tran
6dce33b75c Add libs: cookieinterceptor, lzstring, seedrandom, speedbinb, textinterceptor, zipinterceptor 2026-05-25 20:43:41 +07:00
Cuong-Tran
a6b0263b6a Move aniyomi.lib.i18n to keiyoushi.lib.i18n 2026-05-25 20:43:41 +07:00
Cuong-Tran
ef8c0c00d9 Move aniyomi.lib.dataimage to keiyoushi.lib.dataimage 2026-05-25 20:43:41 +07:00
Cuong-Tran
1c26f701cc Move aniyomi.lib.cryptoaes to keiyoushi.lib.cryptoaes 2026-05-25 20:43:41 +07:00
Cuong-Tran
22570c9485 Okru (extractor): Make extractor suspend & use helpers (#349) 2026-05-21 13:28:48 +07:00
imper1aldev
723ec93c42 Okru (extractor): Add client headers
(Kohi-den/extensions-source#1066)

(cherry picked from commit cd4403a9df7983e6e349ed28d81c8763c16db7db)
2026-05-21 13:28:48 +07:00
Cuong-Tran
e3b8528cb0 chore(pixeldrainextractor): simplify string interpolation in API URL 2026-05-19 00:49:38 +07:00
imper1aldev
2472a2c60f feat: Add Pixeldrain Extractor (#328)
(Kohi-den/extensions-source#1076)

(cherry picked from commit 7f9857e5148c1a6a1a1942298d108f6dbcf576e5)

* Lazy load regex & avoid exception

---------

Co-authored-by: Cuong-Tran <16017808+cuong-tran@users.noreply.github.com>
2026-05-19 00:31:05 +07:00
Alpha-782
ec7b81ddd3 RapidShareExtractor: fix yFlix [EN] & MovHub [EN] Cloudflare protection, update filters & domains (#202)
* Fix yFlix Cloudflare issues

* Follow Gemini suggestion

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>

* Move RapidShareExtractor to lib

* Update domain list

* Update filters

* Remove unnecessary dependencies

* Mark SFlix as 'Dead'

* Rename extName from 'SFlix (Dead)' to 'SFlix'

* Remove redirect and updated layout domains

* Refactor RapidShareExtractor to streamline response parsing

---------

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: Cuong-Tran <16017808+cuong-tran@users.noreply.github.com>
2026-05-06 01:36:09 +07:00
Alpha-782
0a7f98d166 Add AnimeKaiTheme: Add HiAnimeWs, AniGo and Merge AnimeKai into Theme (#169)
* Add AnimeKaiTheme and AniGo

* Improve code consistency

* Remove useless notes

* Add HiAnimeWs to AnimeKaiTheme

* Add AnimeKai to AnimeKaiTheme and polish code

* Add touches back in code

* Accidental "" in implementation AnimeKai build.gradle.

* Undo as it was supposed to look like previous commit

* Adjust MegaUpExtractor package name

* Fix error 404 of AnimeKai and co.

* Adjust iframe extraction.
Uses WebView cookie bypass.

* Move iframe unwrapper to extractor

* Refactor HiAnimeWs naming and remove unused dependencies

* Fix warning

* MegaUpExtractor: use toHttpUrlOrNull for safer URL parsing and enhance header building

* Fix recommended/related in relatedAnime

* MegaUpExtractor: Fix iframe unwrapping and refine extraction logic

*   Centralize `DEFAULT_USER_AGENT` to ensure consistency across network requests and WebView.
*   Improve iframe URL unwrapping by using `UrlUtils.fixUrl` for better relative path handling.
*   Update network calls to use `bodyString()` and `parseAs` extensions directly on responses, ensuring proper resource management.
*   Refine regex patterns for video extensions and hoster extraction.
*   Add null safety checks when parsing tokens and iframe group values.

* AnimeKaiTheme: Refactor year filter list generation

Simplify the creation of the 1900s–1990s year pairs

* Refactor related and recommended anime parsing logic in multiple sources

* Clean up code and use helper functions

* Remove hardcoded `User-Agent` from headers.
* Use `useAsJsoup` helper in `fetchEpisodeAnimeId`.
* Relocate `fetchServers` and `parseServersFromHtml` methods for better code organization.

* Refactor popular anime extraction logic and improve title retrieval methods

* Fix title retrieval to improve null safety

* Refactor cover-related properties and methods to use background terminology

* Refactor getInfo & fix getTitle

* Fix title again & cleanup getInfo

* simply

* cleanup

* avoid generic Exception

---------

Co-authored-by: Cuong-Tran <16017808+cuong-tran@users.noreply.github.com>
2026-04-27 00:09:32 +07:00
Cuong-Tran
3ff11e51eb (lib/VidMoly): migrate to shared extractor and update implementation (#161)
* (lib/VidMoly): migrate to shared extractor and update implementation

* VidMoly: Use shared `vidmolyextractor` library across multiple sources
* VidMoly: Update implementation to use `parallelCatchingFlatMap` and `PlaylistUtils`
* AnimeSama: Update default base URL and fix VidMoly URL handling
* FRAnime: rename extension for consistent casing
* Multiple: Pass headers to `VidMolyExtractor` and update video list logic
* Delete redundant local `VidMolyExtractor` implementations

* Fix URL handling and improve script data extraction in VidMolyExtractor

* Fix host regex pattern in VidMolyExtractor for improved URL matching
2026-04-16 22:21:36 +07:00
Cuong-Tran
9eaa236f35 feat(lib/unpacker): Improve autoUnpacker logic and error handling (#83)
* feat(lib/unpacker): Improve `autoUnpacker` logic and error handling

* Update `autoUnpacker` to fallback to `Unpacker.unpack` if `JsUnpacker` returns a null or blank result.
* Refactor `JsUnpacker` to return null instead of throwing an exception when encountering unknown P.A.C.K.E.R. encodings or mismatched symbol tables.
* Update unit tests to use `autoUnpacker` and verify new null/empty return behaviors.

* Fix tests

* Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

* Fix tests

* simplify AutoUnpacker logic

* Move the `Unpacker.unpack` fallback outside of the `try-catch` block to avoid redundancy.
* Ensure `JsUnpacker.unpackAndCombine` is isolated within the exception handling scope.

* rename tests

---------

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
2026-03-19 13:52:26 +07:00
Cuong-Tran
9c5136e336 fix(lib/unpacker): Fix indexOutOfBound, fix parsing regex, add autoUnpacker & test, cleanup cloned code (#79)
* Add JsUnpacker and Unpacker unit tests for unpacking scripts

* More tests

* Avoid indexOutOfBound

* feat(lib/unpacker): Add `AutoUnpacker` utility

* Introduce `AutoUnpacker` to automatically try `JsUnpacker` then fall back to `Unpacker` if failed.
* Improve `JsUnpacker.unpackAndCombine` to use `isNotBlank()` for more robust empty string handling.
* Add comprehensive unit tests for `AutoUnpacker` and existing unpackers using various packed script formats.

* fix(lib/jsunpacker): Fix regex for packed JavaScript extraction

* Escape literal pipe character in `.split('|')` pattern to ensure it matches the string literally rather than acting as an OR operator.
* Escape closing curly brace in the regex pattern.

* Remove other cloned JsUnpacker code
2026-03-19 12:08:41 +07:00
Cuong-Tran
3cad1eb053 [skip ci] (lib): migrate StreamHideVidExtractor & StreamVidExtractor to VidHideExtractor (#78)
* [skip ci] (lib/StreamHideVidExtractor): update extraction and utility

* Switch to `useAsJsoup` from `keiyoushi.utils`.
* Update `masterUrl` extraction logic to support StreamVid by adding `src:"` parsing.

* Replace manual substring parsing with a more robust regex for `file` and `src` attributes.

* Use `UrlUtils.fixUrl` to ensure the master playlist URL is correctly formatted.

* migrate StreamHideVidExtractor & StreamVidExtractor to VidHideExtractor
2026-03-19 12:01:25 +07:00
Cuong-Tran
2045e3f7f5 fix(libs/uqloadextractor): Update domain & fix relative URL 2026-03-12 21:49:39 +07:00
Cuong-Tran
06a719cd8a fix(libs/vidhide): Fix URL handling for case with relative path
* Also switch to suspend function
* Update extensions to support suspend functions
* Update extensions to avoid using `parallel` methods when there is `UniversalExtractor`
* Update extensions' domains
2026-03-12 21:49:39 +07:00
Cuong-Tran
361a0b89e8 fix(lib/playlistutils): Fix videos which put audio track at beginning
Improve HLS stream parsing to correctly handle audio-only streams with multiple codecs. It now checks if all codecs are audio-only (`mp4a`) before skipping the stream.
2026-03-12 21:49:39 +07:00
Cuong-Tran
55def65cdf refactor(UrlUtils): Refactor UrlUtils.fixUrl and migrate other places to use it
* Refactor `UrlUtils.fixUrl` to handle relative paths using `okhttp3.HttpUrl`.
* Replace local `getAbsoluteUrl` in `PlaylistUtils` with `UrlUtils.fixUrl`.
* Update return types to nullable `String` for better empty URL handling.
* Add unit test
2026-03-12 21:49:39 +07:00
Cuong-Tran
5de4c2c990 chore(jsunpacker): Migrate jsunpacker from external library to local :lib:unpacker
* Remove `dev.datlag.jsunpacker` dependency.
* Add local `aniyomi.lib.jsunpacker` implementation in `:lib:unpacker`.
* Optimize `Regex` & `sequence` handling
* Update all extensions and extractors to use the new local `:lib:unpacker` project and `aniyomi.lib.jsunpacker` package.
2026-03-01 21:30:51 +07:00
Cuong-Tran
66e32c7827 [skip ci] refactor: migrate parseAs import to keiyoushi.utils (#41)
* Update `parseAs` import from `eu.kanade.tachiyomi.util` to `keiyoushi.utils` across multiple extensions and libraries.
2026-02-28 15:30:32 +07:00
AwkwardPeak7
7ad5124bb8 [skip ci] libs: enable Spotless, change source dir, change namespace (#13481)
* lib: enable spotless, change source directories, change package

* apply changes

* imports

(cherry picked from commit ff36a4ffe0021b2b902fb36b15088b8872e1a1d7)
(cherry picked from commit e7a3e26ff17371110e6199e77167dc1e69557f9d)
2026-02-21 22:23:47 +07:00
AwkwardPeak7
8a37ad935d [skip ci] Run spotless (#13197)
* spotlessApply

* fix lint errors

* build errors

* editonconfig changes

* unused imports

(cherry picked from commit cd2ac54524ddeb4fdea43e7901b1151b20f634af)
(cherry picked from commit 14980cb6ae15db48d6d539e64fd621e1768fc37d)
2026-02-20 19:39:59 +07:00
Cuong-Tran
13a7dbee2c (playlist-utils): Update comment to clarify skipping of audio-only streams (MP4A) 2026-02-09 08:53:11 +07:00
Cuong-Tran
2a183f83f7 sync code 2026-02-07 00:36:25 +07:00
Cuong-Tran
c4182ab585 Update jsunpacker to 1.0.2 and remove kotlin-stdlib-jdk8 exclusions 2026-02-07 00:13:41 +07:00
Cuong-Tran
1c045878b3 Fix build caused by bumping AGP version won't allow lib modules with hyphens in its name 2026-02-07 00:06:06 +07:00
Cuong-Tran
9cf2fe32aa Move extensions.utils to keiyoushi.utils 2026-02-07 00:05:41 +07:00