Skip to content

Feat/anilist linking - #1466

Open
revam wants to merge 6 commits into
masterfrom
feat/anilist-linking
Open

Feat/anilist linking#1466
revam wants to merge 6 commits into
masterfrom
feat/anilist-linking

Conversation

@revam

@revam revam commented Sep 14, 2026

Copy link
Copy Markdown
Member

Summary

Adds the AniList integration to the WebUI: linking series and episodes to AniList, the AniList settings, and the series pages that surface the new data (credits per dub, banners, external links). Also adds a calendar utility page built on the new broadcast-time data. Depends on the server-side AniList provider landing on master (abstractions v6.0.0-alpha.85); older servers without Settings.Anilist and IDs.AniList will not render the AniList tab or overview rows.

Changes

Added

  • core/types/api/anilist.ts, core/react-query/anilist/*: AniList DTO types, queries, mutations and the outage helper. Refresh calls send the JSON body with Immediate/QuickRefresh, and 502/503 upstream responses with Retry-After are surfaced instead of retried.
  • pages/collection/series/AnilistLinking.tsx, components/Collection/Anilist/*: the AniList linking page, mirroring the TMDB one. Selecting a result does a quick refresh (anime + episodes only); the full refresh with images runs server-side once the link is saved. Adds DateAndNumberMatches and DateOffsetMatches to the match ratings.
  • SeriesOverview.tsx, SeriesMetadata, UpdateActionsTab.tsx: AniList rows on the overview, and the "Auto-Search AniList Match", "Update AniList Info" and "Update AniList Images - Force" actions.
  • Settings: AniList tab (auto-link, restricted, existing-links, images, studios, characters/staff, auto-search candidates, auto-purge days) and the first-run tab.
  • SeriesCredits.tsx: a language filter over the cast/crew list, and an AniDB/AniList source toggle. AniList lists the cast and crew of every dub, so the filter lets you view one dub at a time.
  • SeriesImages.tsx, ImageUploadModal.tsx: a Banners tab for the wide-strip banners AniList provides.
  • SeriesOverview.tsx (links): Social and Trailer link types with their own icons, and a region badge on links that carry a language code.
  • pages/utilities/Calendar.tsx: a month/week calendar of airing episodes under Utilities, using the ranged Dashboard/CalendarEpisodes endpoint. Cards show the local broadcast time only when the server knows it (estimated times are marked), with include-missing, include-restricted, only-with-air-time and episode-type filters.

Screenshots

Calendar:
image

Series Overview:
image
image

Linking Pages:
image
image

Series Credits:
image

Added the client-side API layer for the server's new AniList
integration, mirroring the existing TMDB slices.

- Added `src/core/types/api/anilist.ts` with the `AnilistAnime`,
  `AnilistEpisode`, remote search, auto-match and cross-reference DTOs
- Added `src/core/react-query/anilist/{types,queries,mutations}.ts`
  covering the series-scoped, episode-scoped and `/Anilist` routes,
  including cast/crew lookups and the refresh, link, episode-mapping,
  export and import mutations
- Added `getAnilistUnavailableState` and `retryUnlessAnilistUnavailable`
  so `502`/`503` + `Retry-After` responses from AniList-facing endpoints
  are surfaced instead of retried
- Added the AniList auto-search, refresh and image download series
  mutations next to the TMDB ones
- Added `IDs.AniList` to `SeriesIDsType`, extended `MatchRatingValues`
  with `DateAndNumberMatches` and `DateOffsetMatches`, and added
  `getAnilistAnimeLink` to `@/core/util`
Wired AniList into the WebUI using the same component structure as the
TMDB linking flow.

- Added the `AnilistLinking` page at `series/:seriesId/anilist-linking`
  with auto-search preview, online search, linking, episode mapping
  overrides, auto-match apply and a reset-to-auto action; picking a
  result runs an immediate quick refresh before linking
- Added `AnilistLinkSelectPanel`, `EpisodeRow` and `EpisodeSelect`
  under `components/Collection/Anilist`, reusing the TMDB
  `AniDBEpisode`, `MatchRating` and `TopPanel` components
- Generalised `TopPanel` to any rated cross-reference with an optional
  reset handler and taught `MatchRating` the new rating values
- Listed linked AniList anime from `IDs.AniList` on the series overview
  and extended `SeriesMetadata` with add/edit/remove for AniList
- Added AniList auto-search, refresh and force image download entries
  to the series update actions tab
- Added the AniList settings tab, the first-run metadata source tab,
  the `Anilist` server settings type (including `ImageCdnUrl` and
  `RateLimit`) and the `collection.anilist.includeRestricted` WebUI
  setting
- Auto-search and online search show a "temporarily unavailable, try
  again in N seconds" state with a retry button on upstream outages
Every cast and crew role now carries an optional `Language` code (the
work's original language for AniDB and TMDB, the dub language for
AniList), so the credits page gained a "Language" select listing the
languages present in the active Characters/Staff list. It feeds the
filtered list and the "X of Y listed" count, resets on mode change and
stays hidden while there are fewer than two languages to choose from.

Also added an AniDB/AniList source switch: the AniList mode fetches
cast and crew for every linked AniList anime, concatenates them and
feeds the same panels and filters, and the refresh action refreshes
whichever source is selected.
Added a `Banners` category to `SeriesImages`, mapped to the `Banner`
image entity type, so wide banner strips (eg. the 1900x400 AniList
banner) can be browsed, preferred and uploaded like the other image
types.

- Extended `ImageTabType` and the upload modal's tab map
- Added a wide 38x8 rem grid item size to suit ~4.75:1 strips
…verview

Series `Links` may now be of type `Social` or `Trailer` (from AniList
external links and trailers), and per-region links such as AniList
streaming links carry a `LanguageCode`.

- Added `SeriesLinkTypeValues` and the optional `LanguageCode` to
  `SeriesLinkType`
- Social and trailer links get their own icons on the overview links
  panel; every other type keeps the existing globe
- A small uppercase region badge is shown next to a link when it has a
  `LanguageCode`, and the row key includes type and region so
  per-region duplicates of the same URL stay distinct
Added a month/week calendar of airing episodes under
`utilities/calendar`, reachable from the utilities bar, backed by the
ranged `Dashboard/CalendarEpisodes` endpoint.

- Added `useDashboardCalendarEpisodesQuery` and
  `DashboardCalendarEpisodesRequestType`; one request covers the visible
  range, padded a day each side so UTC/local day shifts are covered
- Added `AiredAt`, `HasAirTime` and `IsAirTimeEstimated` to
  `DashboardEpisodeDetailsType`
- Episodes are grouped into the viewer's local day from `AiredAt` when a
  broadcast time is known, otherwise by `AirDate`; cards show the poster,
  series title, episode number/title and the local time, with estimated
  times muted and marked with a tilde
- Cards link to the series page for series in the collection and to
  AniDB otherwise, like the dashboard's upcoming anime panel
- Previous/next/today navigation, a Month/Week switch, "Include
  Missing", "Include Restricted" and "Only With Air Time" toggles, and
  episode type chips that send the `type` parameter only when the
  selection differs from the server default
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