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:
Flávio Augusto Oliveira Costa
2025-03-25 03:38:03 -03:00
committed by GitHub
parent a6f388d076
commit 5a8405a9a8
2 changed files with 3 additions and 1 deletions

View File

@@ -280,6 +280,7 @@ const mediaInformationSchema = z.union([
seasons: z.array(
z.object({
id: z.number(),
seasonNumber: z.number(),
name: z.string().min(0),
episodeCount: z.number().min(0),
}),

View File

@@ -72,7 +72,7 @@ export const RequestMediaModal = createModal<RequestMediaModalProps>(({ actions,
const anySelected = Object.keys(table.getState().rowSelection).length > 0;
const handleMutate = () => {
const selectedSeasons = table.getSelectedRowModel().rows.flatMap((row) => row.original.id);
const selectedSeasons = table.getSelectedRowModel().rows.flatMap((row) => row.original.seasonNumber);
mutate({
integrationId: innerProps.integrationId,
mediaId: innerProps.mediaId,
@@ -114,6 +114,7 @@ export const RequestMediaModal = createModal<RequestMediaModalProps>(({ actions,
interface Season {
id: number;
seasonNumber: number;
name: string;
episodeCount: number;
}