style: auto-fix lint and format
This commit is contained in:
1 parent
afa36bffa9
commit
6bf3c75f9f
3 files changed
+28
-20
No files matched your search
@@ -75,9 +75,7 @@ export class OverseerrIntegration
|
|||||||
});
|
});
|
||||||
const data = await mediaInformationSchema.parseAsync(await response.json());
|
const data = await mediaInformationSchema.parseAsync(await response.json());
|
||||||
const requestedSeasons = [
|
const requestedSeasons = [
|
||||||
...new Set(
|
...new Set(data.mediaInfo?.requests?.flatMap((req) => req.seasons.map((s) => s.seasonNumber)) ?? []),
|
||||||
data.mediaInfo?.requests?.flatMap((req) => req.seasons.map((s) => s.seasonNumber)) ?? [],
|
|
||||||
),
|
|
||||||
];
|
];
|
||||||
const { mediaInfo: _strip, ...rest } = data;
|
const { mediaInfo: _strip, ...rest } = data;
|
||||||
return { ...rest, requestedSeasons };
|
return { ...rest, requestedSeasons };
|
||||||
@@ -351,13 +349,21 @@ interface MovieInformation {
|
|||||||
releaseDate: string;
|
releaseDate: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
const mediaInfoRequestsSchema = z.object({
|
const mediaInfoRequestsSchema = z
|
||||||
requests: z.array(z.object({
|
.object({
|
||||||
seasons: z.array(z.object({
|
requests: z
|
||||||
seasonNumber: z.number(),
|
.array(
|
||||||
})),
|
z.object({
|
||||||
})).optional(),
|
seasons: z.array(
|
||||||
}).optional();
|
z.object({
|
||||||
|
seasonNumber: z.number(),
|
||||||
|
}),
|
||||||
|
),
|
||||||
|
}),
|
||||||
|
)
|
||||||
|
.optional(),
|
||||||
|
})
|
||||||
|
.optional();
|
||||||
|
|
||||||
const mediaInformationSchema = z.union([
|
const mediaInformationSchema = z.union([
|
||||||
z.object({
|
z.object({
|
||||||
@@ -383,9 +389,11 @@ const mediaInformationSchema = z.union([
|
|||||||
}),
|
}),
|
||||||
]);
|
]);
|
||||||
|
|
||||||
const searchMediaInfoSchema = z.object({
|
const searchMediaInfoSchema = z
|
||||||
status: z.number(),
|
.object({
|
||||||
}).optional();
|
status: z.number(),
|
||||||
|
})
|
||||||
|
.optional();
|
||||||
|
|
||||||
const searchSchema = z.object({
|
const searchSchema = z.object({
|
||||||
results: z
|
results: z
|
||||||
|
|||||||
@@ -78,12 +78,8 @@ export const homeSearchEngineGroup = createGroup<GroupItem>({
|
|||||||
|
|
||||||
return {
|
return {
|
||||||
isLoading:
|
isLoading:
|
||||||
defaultSearchEngineQuery.isLoading ||
|
defaultSearchEngineQuery.isLoading || (resultQuery.isLoading && fromIntegrationEnabled) || status === "loading",
|
||||||
(resultQuery.isLoading && fromIntegrationEnabled) ||
|
isError: defaultSearchEngineQuery.isError || (resultQuery.isError && fromIntegrationEnabled),
|
||||||
status === "loading",
|
|
||||||
isError:
|
|
||||||
defaultSearchEngineQuery.isError ||
|
|
||||||
(resultQuery.isError && fromIntegrationEnabled),
|
|
||||||
data: createDefaultSearchEntries(defaultSearchEngine, results, session, query, t),
|
data: createDefaultSearchEntries(defaultSearchEngine, results, session, query, t),
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -72,7 +72,11 @@ export const mediaRequestSearchGroup = createGroup<MediaRequestSearchOption>({
|
|||||||
<Stack gap={2} style={{ flex: 1 }}>
|
<Stack gap={2} style={{ flex: 1 }}>
|
||||||
<Group gap="xs" wrap="nowrap">
|
<Group gap="xs" wrap="nowrap">
|
||||||
<Text>{result.name}</Text>
|
<Text>{result.name}</Text>
|
||||||
{badgeLabel && <Badge size="xs" color={badgeColor} variant="light">{badgeLabel}</Badge>}
|
{badgeLabel && (
|
||||||
|
<Badge size="xs" color={badgeColor} variant="light">
|
||||||
|
{badgeLabel}
|
||||||
|
</Badge>
|
||||||
|
)}
|
||||||
</Group>
|
</Group>
|
||||||
<Text c="dimmed" size="sm" lineClamp={2}>
|
<Text c="dimmed" size="sm" lineClamp={2}>
|
||||||
{result.text ?? getIntegrationName(result.integration.kind)}
|
{result.text ?? getIntegrationName(result.integration.kind)}
|
||||||
|
|||||||
Reference in new issue
Block a user