fix: Media request via search engine (#2677)
* fix search engine using season.id instead of season.seasonNumber on POST to overseerr/jellyseerr causing a incorrect request * fix format on overseerr-integration.ts --------- Co-authored-by: faugusto-oliveira <faugusto.oliveira@outlook.com>
This commit is contained in:
committed by
GitHub
parent
a6f388d076
commit
5a8405a9a8
@@ -280,6 +280,7 @@ const mediaInformationSchema = z.union([
|
|||||||
seasons: z.array(
|
seasons: z.array(
|
||||||
z.object({
|
z.object({
|
||||||
id: z.number(),
|
id: z.number(),
|
||||||
|
seasonNumber: z.number(),
|
||||||
name: z.string().min(0),
|
name: z.string().min(0),
|
||||||
episodeCount: z.number().min(0),
|
episodeCount: z.number().min(0),
|
||||||
}),
|
}),
|
||||||
|
|||||||
@@ -72,7 +72,7 @@ export const RequestMediaModal = createModal<RequestMediaModalProps>(({ actions,
|
|||||||
const anySelected = Object.keys(table.getState().rowSelection).length > 0;
|
const anySelected = Object.keys(table.getState().rowSelection).length > 0;
|
||||||
|
|
||||||
const handleMutate = () => {
|
const handleMutate = () => {
|
||||||
const selectedSeasons = table.getSelectedRowModel().rows.flatMap((row) => row.original.id);
|
const selectedSeasons = table.getSelectedRowModel().rows.flatMap((row) => row.original.seasonNumber);
|
||||||
mutate({
|
mutate({
|
||||||
integrationId: innerProps.integrationId,
|
integrationId: innerProps.integrationId,
|
||||||
mediaId: innerProps.mediaId,
|
mediaId: innerProps.mediaId,
|
||||||
@@ -114,6 +114,7 @@ export const RequestMediaModal = createModal<RequestMediaModalProps>(({ actions,
|
|||||||
|
|
||||||
interface Season {
|
interface Season {
|
||||||
id: number;
|
id: number;
|
||||||
|
seasonNumber: number;
|
||||||
name: string;
|
name: string;
|
||||||
episodeCount: number;
|
episodeCount: number;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user