feat(frontend): Entry details redesign, people filmography, calendar improvements

- EntryDetailsPage: sticky poster layout, centered max-w-4xl, director by-line
  with link, rating pills (IMDb/TMDB/You), quick actions under poster, RatingDialog
  with star UI, In Collections section using backdrops, EntrySettingsDialog with
  show_in_calendar / auto_sync / rating options
- RatingDialog: new component with 10-star interactive rating
- AddEntryToCollectionDialog: optimistic cache updates so checkbox state reflects
  immediately and In Collections section on entry details page refreshes
- PersonDetailsPage: filmography section showing library vs. non-library entries
  via person.roles, TMDB combined credits for non-library titles
- PersonTmdbRedirectPage: new redirect page for TMDB person IDs to local person ID
- PeoplePage: fix person card links to use /people/tmdb/:tmdbId
- CalendarPage: full-height layout, larger episode thumbnails, episode items
  clickable, improved tooltip, show_in_calendar backend filter
- Fix useUpdateEntry to also invalidate entryKeys.all (favorite button reactivity)
- Fix updateRatings API body wrapping
- Add useUpdateEntryRatings, usePersonCredits, useFetchPersonByTmdbId hooks
- Add getCollectionBackdropUrl to media-utils
- Types: show_in_calendar, auto_sync on Entry; id on EntryRatings; roles on People
- Backend: fix fetchPersonData alias in peopleService; remove duplicate
  getPersonCredits; add show_in_calendar filter to episodeService
This commit is contained in:
Mohammed Abad committed 2026-04-01 00:25:30 +01:00
1 parent 11eab03987
commit 3ca24434d7
16 files changed
+857 -322

No files matched your search

+26 -1
View File
@@ -1,9 +1,11 @@
import { useQuery } from '@tanstack/react-query';
import { useQuery, useMutation } from '@tanstack/react-query';
import { peopleApi } from '@/api/people';
export const peopleKeys = {
all: ['people'] as const,
detail: (id: number) => ['people', id] as const,
credits: (id: number) => ['people', id, 'credits'] as const,
tmdbFilmography: (id: number) => ['people', id, 'tmdb-filmography'] as const,
};
export function usePerson(id: number) {
@@ -13,3 +15,26 @@ export function usePerson(id: number) {
enabled: !!id,
});
}
export function usePersonCredits(id: number) {
return useQuery({
queryKey: peopleKeys.credits(id),
queryFn: () => peopleApi.getCredits(id),
enabled: !!id,
});
}
export function usePersonTmdbFilmography(id: number) {
return useQuery({
queryKey: peopleKeys.tmdbFilmography(id),
queryFn: () => peopleApi.getTmdbFilmography(id),
enabled: !!id,
staleTime: 10 * 60 * 1000,
});
}
export function useFetchPersonByTmdbId() {
return useMutation({
mutationFn: (tmdb_id: number) => peopleApi.fetchByTmdbId(tmdb_id),
});
}