Skip to content

Update rate limit and co.#566

Open
Alpha-782 wants to merge 4 commits into
yuzono:masterfrom
Alpha-782:depreciated-methods
Open

Update rate limit and co.#566
Alpha-782 wants to merge 4 commits into
yuzono:masterfrom
Alpha-782:depreciated-methods

Conversation

@Alpha-782

@Alpha-782 Alpha-782 commented Jun 30, 2026

Copy link
Copy Markdown
Collaborator

Checklist:

  • Updated extVersionCode value in build.gradle for individual extensions
  • Updated overrideVersionCode or baseVersionCode as needed for all multisrc extensions
  • Referenced all related issues in the PR body (e.g. "Closes #xyz")
  • Added the isNsfw = true flag in build.gradle when appropriate
  • Have not changed source names
  • Have explicitly kept the id if a source's name or language were changed
  • Have tested the modifications by compiling and running the extension through Android Studio
  • Have removed web_hi_res_512.png when adding a new extension
  • This PR is AI-assisted, I have reviewed the changes manually and confirmed they are not slop
  • Have made sure all the icons are in png format

Add a 👍 reaction to pull requests you find important.

Summary by Sourcery

Modernize networking configuration to use Kotlin time-based rate limiting and timeouts across several anime extensions and shared themes.

Enhancements:

  • Replace java.util.concurrent.TimeUnit-based rate limit and timeout configuration with kotlin.time Duration APIs for multiple sources and multisrc themes.
  • Adjust cache expiry calculations to use kotlin.time days duration for server discovery logic.

@sourcery-ai

sourcery-ai Bot commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

Reviewer's Guide

This PR migrates several anime extensions and multisrc themes from java.util.concurrent-based timeouts and rate limiting to the OkHttp/kotlin-time Duration APIs, standardizing timeout and rate limit configuration and improving readability and consistency across sources.

File-Level Changes

Change Details Files
Replace rateLimitHost and timeout calls that use TimeUnit-based parameters with kotlin.time Duration-based overloads for multisrc themes and individual extensions.
  • Update AnikotoTheme client and domain update logic to use 1.seconds for rate limiting instead of TimeUnit.SECONDS-based periods.
  • Change AnikotoTheme playlist/m3u8 clients to use 30.seconds read timeouts and compute seven-day validity using 7.days.inWholeMilliseconds.
  • Update AnimeKaiTheme client initialization and domain config to use 1.seconds for rate limiting instead of TimeUnit.SECONDS.
  • Adjust Animetsu client and m3u8 client to use 1.seconds rate limiting and 30.seconds read timeouts.
  • Update AniList client to rate-limit Jikan API calls using 1.seconds instead of TimeUnit.SECONDS.
lib-multisrc/anikototheme/src/eu/kanade/tachiyomi/multisrc/anikototheme/AnikotoTheme.kt
lib-multisrc/animekaitheme/src/eu/kanade/tachiyomi/multisrc/animekaitheme/AnimeKaiTheme.kt
src/all/animetsu/src/eu/kanade/tachiyomi/animeextension/all/animetsu/Animetsu.kt
src/en/anilist/src/eu/kanade/tachiyomi/animeextension/en/anilist/AniList.kt
Standardize HTTP client connect/write/read timeouts across several single-source extensions using kotlin.time Duration.Companion.seconds.
  • Change EnNovelas temporary client to use 30.seconds connect timeout and 35.seconds write/read timeouts.
  • Update AnimeCore extension client to use 30.seconds for connect/write/read timeouts.
  • Modify HanimeWasmBinary timeoutClient to use 15.seconds connect timeout and 30.seconds read timeout.
  • Set SuperStreamAPI ignore-certificate client to use 70.seconds read timeout.
src/es/ennovelas/src/eu/kanade/tachiyomi/animeextension/es/ennovelas/EnNovelas.kt
src/pt/animesotaku/src/eu/kanade/tachiyomi/animeextension/pt/animesotaku/AnimeCore.kt
src/en/hanime/src/eu/kanade/tachiyomi/animeextension/en/hanime/HanimeWasmBinary.kt
src/en/superstream/src/eu/kanade/tachiyomi/animeextension/en/superstream/SuperStreamAPI.kt

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - I've reviewed your changes and they look great!


Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request migrates OkHttpClient configurations, such as timeouts and rate limits, across multiple extensions and multisrc themes from Java's TimeUnit to Kotlin's Duration APIs. Feedback was provided regarding an outdated comment in AnimeKaiTheme.kt that contradicts the newly introduced use of kotlin.time.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant