feat: Add an http server for use in extensions - #2348
Merged
Merged
Conversation
Member
|
yeah probably a good idea to disable external downloading of files from the local http server. i can't think of a use case for that anyway. (although im not up to date on the latest extension techniques) |
Dark25
added a commit
to Animetailapp/Animetail
that referenced
this pull request
Jul 10, 2026
* Fix support for non-system SAF providers (#3530) * Add Hikka tracker support (aniyomiorg#1386) Co-authored-by: AntsyLich <59261191+AntsyLich@users.noreply.github.com> * Show usernames for each tracker in settings (#3533) * Hikka: Set PLAN_TO_READ for manga with no progress (#3534) Currently, every title will be added as READING, even if no chapter has been read. For consistency with every other tracker, I added the hasReadChapters check as seen in other tracker implementations. * Adapt model implementation for TachiyomiX 1.6 (#3412) * Fix chapter's `memo` field not being updated for existing chapters (#3538) * Fix crash when putting app in background (#3523) * Add proguard rules to keep Serializable writeReplace and readResolve * feat: Add torrent streaming support (aniyomiorg#2346) * Refactor: Unify Torrent streaming around official Aniyomi TorrServer implementation * feat: Add thumbnail support when seeking (aniyomiorg#2343) * feat: Add an http server for use in extensions (aniyomiorg#2348) * fix: resolve cherry-pick conflicts and migrate to SharedFlow - Fixed syntax and type errors in MangaRestorer and SearchableSettings. - Migrated Hikka tracker to use the new split MangaTrack domain models. - Replaced deprecated LocalBroadcastManager with Kotlin SharedFlow in extension installers. - Corrected SQLDelight package imports in AppModule and dependency issues in PlayerActivity. - Converted BackupManga to a data class to support copy operations in SyncService. * fix: resolve "invalid url: 0" by ensuring torrent port initialization - Modified TorrentServerService to set the port from preferences before checking the server status (echo). - Improved the wait() method with more robust logic and an increased timeout (20s). - Added checks in PlayerActivity to wait for the server and handle startup failures with a toast, preventing the app from attempting to load invalid URLs. * Fix duplicate images after resuming paused downloads (#3504) Co-authored-by: AntsyLich <59261191+AntsyLich@users.noreply.github.com> * Address compose and xmlutil deprecations (#3507) * Use Shikimori's GraphQL API where possible (#3499) User list mutation aren't available via GraphQL, so that will still be done with the v2 API. Shikimori API docs say to prefer the GraphQL API when possible: https://shikimori.io/api/doc Allows adding some additional data in the search results, namely: - Authors & Artists - Description As a nice bonus, this reduces the number of requests to Shikimori because the findLibManga method no longer needs to do 2 calls to fetch both list and title data. * Invalidate download cache after backup restore (#3096) Co-authored-by: AntsyLich <59261191+AntsyLich@users.noreply.github.com> * Fix crash when putting app in background (#3523) * Fix support for non-system SAF providers (#3530) * Don't use GMS to detect if GMS is available (#3525) Co-authored-by: AntsyLich <59261191+AntsyLich@users.noreply.github.com> * Add MangaBaka tracker support (#3047) * Add support for MangaBaka Note: missing a client ID which should be added by the project owner. * Fix typo causing token refresh to fail The field is called `refresh_token` not `refreshToken`, so all token refreshes would fail with a 401. * Use user-preferred score type Currently, this only set once on login. When selecting a different score type on MangaBaka, users (currently) will have to log out and log in again in order for Mihon to refetch the score setting. This appears to be what Mihon's AniList implementation does as well, so I followed that. * Fix score preference Didn't get caught during the rebase. * Fix finish_date * Fix dates appearing offset Timezone shenanigans meant Mihon was sending an ISO 8601 string for the UTC timezone which lead to issues in non-UTC timezones. For example: 1. User in UTC+1 selects 2026-03-22 2. Date picker returns 2026-03-22T00:00:00+01:00 3. MangaBakaApi converts that to an instant, converting it to UTC: 2026-03-21T23:00:00Z 4. MangaBaka receives that and sets all time components to 0 5. Mihon (when opening the track sheet next) receives: 2026-03-21T00:00:00Z 6. Mihon renders that as 2026-03-21 I figured out that MangaBaka accepts date-only strings as well, so we just send those now. * Remove fetching of total_chapters from MangaBaka Currently, this information is not what Mihon needs for automatic marking as COMPLETED since MangaBaka considers this an ongoing tally of volume-published chapters rather than the final chapter number of a title. If anyone other than me used this code: Probably will have to unlink & relink MB entries to get rid of the total_chapters data, not sure. MangaBaka is currently considering a request from me to potentially change this, but currently it's not what we need. * Fix start date being reset on each read chapter Admittedly a silly oversight. The other date-supporting trackers (AL, MAL, Kitsu) use this check as opposed to `>= 0.0`. * Add id: prefix search for MangaBaka * Use new /v1/my/profile endpoint Kindly added by the developers after my request <3. * Change tracker ID to 11 * Remove unused import * Identify Mihon in UA on all requests * Use new `published.start_date` field for search * Change Mihon's User Agent string for MangaBaka - use MR.strings.app_name to avoid manual work for forks - include app ID & commit sha for further distinction * Add Changelog entry * Add Mihon client ID * Add OAuth state query param This is?/will be? required by MangaBaka's auth provider and caused linking issues for anyone who tried to link with MB in the past two weeks or so. * Update MangaBaka API URL Changed as per MB announcement from 2026-05-27 * Use `titles` instead of old `title` * Make title selection a method on MangaBakaItem * Include ID in fallback title for easier reporting Makes it a lot more intuitive for users. Also reworded the message to more clearly direct users to the Mangabaka Discord server instead of sounding like an instruction to contact some "mangabaka" user in the Mihon Discord. * `titles` is nullable At least I noticed this before it was merged... * Fix MangaBaka brand name Co-authored-by: BrutuZ <7104931+BrutuZ@users.noreply.github.com> * Remove Hikka comment * Put MangaBaka at the top of the tracker list AntsyLich decreed it to be like this. Co-authored-by: AntsyLich <59261191+AntsyLich@users.noreply.github.com> * Add display name support from #3533 * Fix changelog * Rename MB icon to brand_mangabaka.webp --------- Co-authored-by: BrutuZ <7104931+BrutuZ@users.noreply.github.com> Co-authored-by: AntsyLich <59261191+AntsyLich@users.noreply.github.com> * update * run spotless * fix(browse): resolve swapped search queries in anime/manga extension tabs Fixes an issue where search queries typed in the extension tab search bar were routed to the incorrect screen model, swapping manga and anime searches. The previous routing logic was based on index parity (odd/even tab index). Due to changes in the tab layout order (such as the feed tab), the anime extension tab ended up on an odd index (3) and the manga extension tab on an even index (4), breaking the parity assumption and swapping the queries. Replaced the modulo check with explicit checks against the resolved tab indices ('animeExtensionsTabIndex' and 'mangaExtensionsTabIndex'). * Fix reader navigator slider steps not updating after changing chapter (#3549) * Fix Hikka search failing due to unclosed response & show toast on remote-removed titles (#3548) * Fix Hikka search failing due to unclosed response This closes #3547. I have also included a precautionary refactor of the `getRead` method in HikkaApi.kt, which by the looks of it _could_ leak an unclosed response as well. The try/catch with awaitSuccess pattern has been used in this same way in the Bangumi and MangaBaka implementations as well. The benefit here is that `awaitSuccess()` closes the response on error before throwing an `HttpException`. * Show toast on remote-removed list entries * Update dependency org.conscrypt:conscrypt-android to v2.6.0 (#3552) * Update aboutLibraries to v15 (#3553) * Update dependency io.kotest:kotest-assertions-core to v6.2.2 (#3544) * Update actions/setup-java action to v5.5.0 (#3543) * Fix reader navigator slider steps not updating after changing chapter (#3549) * Fix app not reading `tachiyomix.extensionLib` extension metadata 2 (#3559) * Add vertical chapter navigator for paged reader with height adjustment option (#3531) * chore: apply uncommitted Mihon integration changes * Remove flag to disable code shrinking androidx.benchmark plugin adds non minified versions of the release variants. we can just reuse that. * Update xmlutil to v1.0.1 (#3555) * Update dependency com.google.firebase:firebase-bom to v34.16.0 (#3562) * fix(track): resolve Hikka compilation errors and split model compatibility * run spotless * Enable ABI splits and update release artifacts * Enable ABI splits in `build.gradle.kts` for `armeabi-v7a`, `arm64-v8a`, `x86`, and `x86_64`. * Add release APK and baseline profile data files. --------- Co-authored-by: AntsyLich <59261191+AntsyLich@users.noreply.github.com> Co-authored-by: LorgOn <37798530+Lorg0n@users.noreply.github.com> Co-authored-by: MajorTanya <39014446+MajorTanya@users.noreply.github.com> Co-authored-by: Cuong-Tran <16017808+cuong-tran@users.noreply.github.com> Co-authored-by: Secozzi <49240133+Secozzi@users.noreply.github.com> Co-authored-by: Mohannad <134175138+xMohnad@users.noreply.github.com> Co-authored-by: Leodyver Semilla <124951048+leodyversemilla07@users.noreply.github.com> Co-authored-by: BrutuZ <7104931+BrutuZ@users.noreply.github.com> Co-authored-by: Mend Renovate <bot@renovateapp.com>
Dark25
added a commit
to Animetailapp/Animetail
that referenced
this pull request
Jul 25, 2026
* Revert "fix: Remove duplicate search results in settings (aniyomiorg#2222)" (aniyomiorg#2225) * feat: Enable horizontal seek gesture summary (aniyomiorg#2224) * fix: Swap left and right double tap key event handlers (aniyomiorg#2219) * chore(i18n): Translations update from Hosted Weblate (aniyomiorg#2217) Co-authored-by: Jan Šmedek <smedek.j@seznam.cz> Co-authored-by: VtrU8i <victor.u8i@gmail.com> Co-authored-by: kenkoro <frogharvard@gmail.com> Co-authored-by: Frosted <frosted@users.noreply.hosted.weblate.org> Co-authored-by: Mousica <golonchy.aitta@gmail.com> Co-authored-by: Максим Горпиніч <gorpinicmaksim0@gmail.com> Co-authored-by: Chopper <156493704+choppeh@users.noreply.github.com> Co-authored-by: Joël Miramon <joel@miramon.de> * feat: Add torrent streaming support (aniyomiorg#2346) * feat: Add thumbnail support when seeking (aniyomiorg#2343) * feat: Add an http server for use in extensions (aniyomiorg#2348) * feat: Fetch .torrent details without starting torrent server (aniyomiorg#2361) * fix(build): move withHostTest inside android block in source-api * fix(merge): resolve remaining conflict markers in PlayerActivity, PlayerViewModel, base strings * fix(merge): clean remaining conflict blocks in PlayerActivity and PlayerViewModel * style: apply spotless code formatting * fix(build): remove duplicate isTorrentEnabled and startTorrentServer methods in AnimeScreenModel --------- Co-authored-by: Secozzi <49240133+Secozzi@users.noreply.github.com> Co-authored-by: kenkoro <85745790+kenkoro@users.noreply.github.com> Co-authored-by: alphastark <kolderic@gmail.com> Co-authored-by: Weblate (bot) <noreply@weblate.org> Co-authored-by: Jan Šmedek <smedek.j@seznam.cz> Co-authored-by: VtrU8i <victor.u8i@gmail.com> Co-authored-by: kenkoro <frogharvard@gmail.com> Co-authored-by: Frosted <frosted@users.noreply.hosted.weblate.org> Co-authored-by: Mousica <golonchy.aitta@gmail.com> Co-authored-by: Максим Горпиніч <gorpinicmaksim0@gmail.com> Co-authored-by: Chopper <156493704+choppeh@users.noreply.github.com> Co-authored-by: Joël Miramon <joel@miramon.de> Co-authored-by: lord-ne <34069872+lord-ne@users.noreply.github.com>
Dark25
added a commit
to Animetailapp/Animetail
that referenced
this pull request
Aug 7, 2026
* Revert "fix: Remove duplicate search results in settings (aniyomiorg#2222)" (aniyomiorg#2225) * feat: Enable horizontal seek gesture summary (aniyomiorg#2224) * fix: Swap left and right double tap key event handlers (aniyomiorg#2219) * chore(i18n): Translations update from Hosted Weblate (aniyomiorg#2217) Co-authored-by: Jan Šmedek <smedek.j@seznam.cz> Co-authored-by: VtrU8i <victor.u8i@gmail.com> Co-authored-by: kenkoro <frogharvard@gmail.com> Co-authored-by: Frosted <frosted@users.noreply.hosted.weblate.org> Co-authored-by: Mousica <golonchy.aitta@gmail.com> Co-authored-by: Максим Горпиніч <gorpinicmaksim0@gmail.com> Co-authored-by: Chopper <156493704+choppeh@users.noreply.github.com> Co-authored-by: Joël Miramon <joel@miramon.de> * feat: Add torrent streaming support (aniyomiorg#2346) * feat: Add thumbnail support when seeking (aniyomiorg#2343) * feat: Add an http server for use in extensions (aniyomiorg#2348) * feat: Fetch .torrent details without starting torrent server (aniyomiorg#2361) * feat: Hide the blocking getTorrentInfo shim function (aniyomiorg#2364) * feat: Adapt tachiyomix 1.6 into extension-lib 17 (aniyomiorg#2369) Co-authored-by: AntsyLich <59261191+AntsyLich@users.noreply.github.com> Co-authored-by: AwkwardPeak7 <48650614+AwkwardPeak7@users.noreply.github.com> * fix: Move httpserver starting to service (aniyomiorg#2368) Co-authored-by: Joël Miramon <joel@miramon.de> * Fix duplicate JsonObject.kt file and syntax/import error in AnimeHttpSource.kt * Add override modifiers to AnimeCatalogueSource methods to match newer AnimeSource interface * Import AnimeCatalogueSource in AnimeSourceManager.kt * Remove obsolete RxJava helper methods from LocalAnimeSource.kt * Implement getCatalogueSources in AndroidAnimeSourceManager * Fix supportsLatest check in BrowseAnimeSourceScreen.kt * Suppress deprecation warning in NetworkStreamSource.kt * Resolve compilation issues in BrowseAnimeSourceViewModel, AnimeSearchViewModel, AnimeViewModel, and ExternalIntents * run spotless * Fix database migration conflict by ensuring memo columns exist on driver startup * Fix SQLDelight verify migration syntax error in 136.sqm * Implement Copilot recommendations to prevent HTTP server resource leaks and optimize startup logic * Optimize localUrl regex in Video.kt to match any localhost port * Provide backward compatible default implementations for getAnimeEpisodeUpdate and getAnimeSeasonUpdate on AnimeSource to prevent AbstractMethodError on older extensions --------- Co-authored-by: Secozzi <49240133+Secozzi@users.noreply.github.com> Co-authored-by: kenkoro <85745790+kenkoro@users.noreply.github.com> Co-authored-by: alphastark <kolderic@gmail.com> Co-authored-by: Weblate (bot) <noreply@weblate.org> Co-authored-by: Jan Šmedek <smedek.j@seznam.cz> Co-authored-by: VtrU8i <victor.u8i@gmail.com> Co-authored-by: kenkoro <frogharvard@gmail.com> Co-authored-by: Frosted <frosted@users.noreply.hosted.weblate.org> Co-authored-by: Mousica <golonchy.aitta@gmail.com> Co-authored-by: Максим Горпиніч <gorpinicmaksim0@gmail.com> Co-authored-by: Chopper <156493704+choppeh@users.noreply.github.com> Co-authored-by: Joël Miramon <joel@miramon.de> Co-authored-by: lord-ne <34069872+lord-ne@users.noreply.github.com> Co-authored-by: AntsyLich <59261191+AntsyLich@users.noreply.github.com> Co-authored-by: AwkwardPeak7 <48650614+AwkwardPeak7@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
While extensions can technically already spin up their own nanohttpd server, adding support in the app allows for the server to be closed when it's not needed anymore*
*An exception is an external downloader, since it's not possible to know when it's finished. There's also the problem of aniyomi being killed while the external downloader is in progress, so I'm inclined to disable external downloaders for local urls. Would love to hear further thoughts on that.