Unify entry page for TMDB previews and add artwork section
- Entry details page now also renders entries not in the library, using the TMDB preview mapped to the same entry shape; remove TmdbPreviewPage - Preview endpoint returns an entry-shaped object, TMDB seasons and directors - Artwork section: TMDB posters, backdrops and logos merged with the media table, with in-library badges, language filter and add-to-library - Record tmdb_path on downloaded media so TMDB images can be matched - Recommendations by TMDB id for entries not in the library
This commit is contained in:
1 parent
a9ff2d089a
commit
28eee34548
19 files changed
+1190
-411
No files matched your search
@@ -6,6 +6,9 @@ import type {
|
||||
TmdbPreview,
|
||||
TmdbEntry,
|
||||
TmdbPaginatedResponse,
|
||||
ArtworkResponse,
|
||||
ArtworkType,
|
||||
Media,
|
||||
} from "@/types";
|
||||
|
||||
export const entriesApi = {
|
||||
@@ -69,6 +72,24 @@ export const entriesApi = {
|
||||
.get<TmdbPaginatedResponse<TmdbEntry>>(`/entries/${id}/recommendations`)
|
||||
.then((r) => r.data),
|
||||
|
||||
getTmdbRecommendations: (type: "movie" | "tv", tmdbId: number) =>
|
||||
api
|
||||
.get<TmdbPaginatedResponse<TmdbEntry>>(
|
||||
`/entries/tmdb/recommendations/${type}/${tmdbId}`,
|
||||
)
|
||||
.then((r) => r.data),
|
||||
|
||||
getArtwork: (id: number) =>
|
||||
api.get<ArtworkResponse>(`/entries/${id}/artwork`).then((r) => r.data),
|
||||
|
||||
getTmdbArtwork: (type: "movie" | "tv", tmdbId: number) =>
|
||||
api
|
||||
.get<ArtworkResponse>(`/entries/tmdb/artwork/${type}/${tmdbId}`)
|
||||
.then((r) => r.data),
|
||||
|
||||
addArtwork: (id: number, data: { type: ArtworkType; file_path: string }) =>
|
||||
api.post<Media>(`/entries/${id}/artwork`, data).then((r) => r.data),
|
||||
|
||||
syncSeries: () => api.get("/entries/sync-series").then((r) => r.data),
|
||||
|
||||
previewTmdb: (tmdbId: number, type: "movie" | "tv") =>
|
||||
|
||||
Reference in new issue
Block a user