[TASK] Add Oshi support by lolamtisch · Pull Request #4224 · MALSync/MALSync · GitHub
Skip to content

[TASK] Add Oshi support - #4224

Open
lolamtisch wants to merge 12 commits into
masterfrom
oshi
Open

lolamtisch wants to merge 12 commits into
masterfrom
oshi

Conversation

@lolamtisch

Copy link
Copy Markdown
Member

No description provided.

Copilot AI lite review requested due to automatic review settings September 21, 2026 12:02

Copilot AI 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.

Copilot review overview

🟡 Changes recommended

There are confirmed TypeScript-breaking access modifier issues (supportsTags) and AnimeOshi list keying issues that can cause incorrect caching/progress behavior.

Get a fresh assessment by requesting another Copilot review.

Review effort: Lite
Findings: 2 High severity · 1 Medium severity

Open (3)
What changed in this PR

This PR adds a new sync provider, AnimeOshi, including OAuth flow, provider implementations (single/list/search/metadata), and integration into the webextension build + minimal UI. It also improves provider JSON parsing robustness via a shared parseJson helper and updates tag-handling to be optionally disabled per provider.

Changes:

  • Add AnimeOshi provider end-to-end (OAuth page, API helper, single/list/search/meta providers, sync routing).
  • Extend sync/type/slug resolution and minimal UI/provider lists to include ANIMEOSHI.
  • Harden JSON parsing for provider helpers by using parseJson and add unit tests for it.
File Description
webpackConfig/​webextension.content.config.js Adds webextension content entrypoint for AnimeOshi OAuth script.
webpackConfig/​webextension.assets.js Registers OAuth content script for the AnimeOshi malsync OAuth page.
webpackConfig/​utils/​pageUrls.js Adds malsync OAuth match pattern for AnimeOshi.
webpackConfig/​utils/​keys.js Adds AnimeOshi key material + CI env wiring for build-time injection.
webpackConfig/​httpPermissions.json Adds AnimeOshi domain to extension network permissions.
test/​src/​provider/​errors.test.ts Adds unit tests for parseJson error handling behavior.
test/​src/​provider/​AnimeOshi/​single.test.ts Adds fixtures + tests covering AnimeOshi single/list/sync behaviors.
test/​src/​minimal/​listSync/​syncHandling.test.ts Extends sync handling tests to include AnimeOshi provider.
src/​utils/​syncHandler.ts Routes AnimeOshi URLs and wires AnimeOshi single/list providers into sync flow.
src/​utils/​slugs.ts Adds AnimeOshi URL parsing + slug/url conversion support.
src/​utils/​general.ts Adds useTags toggle to entry settings helpers for providers without tag support.
src/​provider/​templates.ts Adds provider template naming for AnimeOshi.
src/​index.ts Routes malsync /animeoshi/oauth to AnimeOshi OAuth handler.
src/​index-webextension/​animeoshiOauth.ts Webextension bootstrap wrapper for AnimeOshi OAuth page.
src/​api/​settings.ts Adds persisted settings keys for AnimeOshi token/refresh token.
src/​animeoshi/​oauth.ts Implements PKCE OAuth flow for AnimeOshi, storing resulting tokens.
src/​_provider/​singleFactory.ts Registers AnimeOshi Single in the provider single factory.
src/​_provider/​singleAbstract.ts Adds AnimeOshi ID slot, tag support gating, and AnimeOshi key generation.
src/​_provider/​Shikimori/​helper.ts Switches JSON parsing to parseJson for improved error diagnostics.
src/​_provider/​searchFactory.ts Adds AnimeOshi provider search routing.
src/​_provider/​Search/​searchClass.ts Treats NotAuthenticated during rules lookup as a non-fatal “no rules” case.
src/​_provider/​Search/​rulesClass.ts Switches JSON parsing to parseJson.
src/​_provider/​MyAnimeList_api/​helper.ts Switches JSON parsing to parseJson.
src/​_provider/​metaDataFactory.ts Registers AnimeOshi meta overview provider in factory.
src/​_provider/​listFactory.ts Registers AnimeOshi list provider in factory.
src/​_provider/​listAbstract.ts Passes provider tag support into entry settings loading.
src/​_provider/​Kitsu/​helper.ts Switches JSON parsing to parseJson.
src/​_provider/​helper.ts Adds ANIMEOSHI to SyncTypes and provider options.
src/​_provider/​Errors.ts Enhances parseJson to produce better UnexpectedResponseError messages.
src/​_provider/​AnimeOshi/​single.ts Adds AnimeOshi Single implementation (update/sync/delete, no tags/dates/rewatch).
src/​_provider/​AnimeOshi/​search.ts Adds AnimeOshi search implementation via public API.
src/​_provider/​AnimeOshi/​metaOverview.ts Adds AnimeOshi metadata overview implementation via public API.
src/​_provider/​AnimeOshi/​list.ts Adds AnimeOshi list implementation (watchlist pagination + mapping).
src/​_provider/​AnimeOshi/​helper.ts Adds AnimeOshi API client (token refresh, auth/public calls, mapping helpers).
src/​_minimal/​views/​test.vue Adds AnimeOshi URLs to minimal test view.
src/​_minimal/​components/​settings/​settings-list-sync.vue Adds AnimeOshi to list-sync settings UI model/provider list wiring.
globals.d.ts Extends injected __MAL_SYNC_KEYS__ typing to include AnimeOshi key fields.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread src/_provider/AnimeOshi/list.ts
Comment thread src/_provider/AnimeOshi/single.ts
Comment thread webpackConfig/utils/keys.js

This branch has not been deployed

No deployments
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.

2 participants