forked from keir/asbplayer
feat(jimaku): allow configuring the Jimaku API URL #1
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/jimaku-configurable-api-url"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes keir/asbplayer#1
Summary
Adds a Jimaku API URL field to the online subtitle search dialog so the Jimaku endpoint is no longer hard-coded to
https://jimaku.cc/api. This makes it possible to point asbplayer at a self-hosted Jimaku instance, a caching reverse proxy (to stay under the API rate limit), or a network workaround.Changes
common/subtitle-sources/subtitle-sources.ts: exportdefaultJimakuBaseUrl, addnormalizeJimakuBaseUrl/isValidJimakuBaseUrl— empty falls back tohttps://jimaku.cc/api, trailing slashes are stripped, and anything else must be a well-formed http(s) URL.JimakuClientnow normalizes itsbaseUrloption at construction.common/global-state/index.ts: newjimakuBaseUrl?: stringonOnlineSubtitleSourceConfig, persisted alongside the other Jimaku settings (empty = default).common/components/OnlineSubtitleSourceDialog.tsx: new Jimaku API URL field below the API key (with inline validation and default shown as placeholder); the configured URL is passed toJimakuClient.common/components/VideoDataSyncDialog.tsx: wires the new setting through.jimakuBaseUrl,jimakuBaseUrlHint,jimakuBaseUrlInvalidadded to all 13 locale files (loc-keys-matchpasses; ja translated, other locales use English fallback text).docs/docs/guides/online-subtitles.md, including a note that a custom host must allow CORS.Testing
pnpm run verifypasses (loc key checks, typecheck, common/client/extension tests, eslint, scripts tests, prettier).Notes
keir/asbplayer-forkbecausekeir/asbplayeris a read-only mirror that auto-pulls fromgithub.com/asbplayer/asbplayer— Forgejo hard-codes that mirrors can never accept pull requests (Repository.CanEnablePulls()returnsfalsefor mirrors), so the change is reviewed here instead. The fork'smainmatches the mirror'smainat time of forking.github.com:asbplayer/asbplayeras a PR there.Assisted-bytag per CONTRIBUTING.md.probe same-repoto feat(jimaku): allow configuring the Jimaku API URLView command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.