Feat/anilist linking - #1466
Open
revam wants to merge 6 commits into
Open
Conversation
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
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.
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(abstractionsv6.0.0-alpha.85); older servers withoutSettings.AnilistandIDs.AniListwill 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 withImmediate/QuickRefresh, and 502/503 upstream responses withRetry-Afterare 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. AddsDateAndNumberMatchesandDateOffsetMatchesto 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.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):SocialandTrailerlink 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 rangedDashboard/CalendarEpisodesendpoint. 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:

Series Overview:


Linking Pages:


Series Credits:
