* 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>
* compileOnlyApi
* api
* synchrony: simplify source passing
* bumps due to synchrony change
(cherry picked from commit 84693cab7ba7cc4830a503737498a1b2714f98af)
(cherry picked from commit 3f63cad4e940b0f6f7359bad99c6ab20dedec585)
* 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)
* 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>
* (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
* 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>
* 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
* [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
* 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
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.
* 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
* 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.