mirror of
https://github.com/zoriya/Kyoo.git
synced 2025-05-24 02:02:36 -04:00
Use harcoded s1e1 for items since relations dont work on them
This commit is contained in:
parent
f8e887c1f2
commit
4bb7b4b6c4
@ -36,7 +36,11 @@ export const LibraryItemP = z.union([
|
||||
/*
|
||||
* Either a Show
|
||||
*/
|
||||
ShowP.and(z.object({ kind: z.literal(ItemKind.Show) })),
|
||||
ShowP.and(
|
||||
z.object({
|
||||
kind: z.literal(ItemKind.Show),
|
||||
}),
|
||||
).transform((x) => ({ ...x, playHref: `/watch/${x.slug}-s1e1` })),
|
||||
/*
|
||||
* Or a Movie
|
||||
*/
|
||||
|
@ -98,7 +98,4 @@ export const Header = ({
|
||||
Header.query = (): QueryIdentifier<LibraryItem> => ({
|
||||
parser: LibraryItemP,
|
||||
path: ["items", "random"],
|
||||
params: {
|
||||
fields: "firstEpisode",
|
||||
},
|
||||
});
|
||||
|
@ -36,6 +36,7 @@ import {
|
||||
P,
|
||||
SubP,
|
||||
focusReset,
|
||||
tooltip,
|
||||
ts,
|
||||
} from "@kyoo/primitives";
|
||||
import { useTranslation } from "react-i18next";
|
||||
@ -69,6 +70,7 @@ export const ItemDetails = ({
|
||||
playHref: string | null;
|
||||
}>) => {
|
||||
const { push } = useRouter();
|
||||
const { t } = useTranslation();
|
||||
const { css } = useYoshiki("recommanded-card");
|
||||
|
||||
return (
|
||||
@ -142,6 +144,7 @@ export const ItemDetails = ({
|
||||
size={20}
|
||||
as={Pressable}
|
||||
onPress={() => push(playHref ?? "")}
|
||||
{...tooltip(t("show.play"))}
|
||||
{...css({ fover: { self: { transform: "scale(1.2)" as any, mX: ts(0.5) } } })}
|
||||
/>
|
||||
)}
|
||||
@ -199,6 +202,5 @@ Recommanded.query = (): QueryIdentifier<LibraryItem> => ({
|
||||
params: {
|
||||
sortBy: "random",
|
||||
limit: 6,
|
||||
fields: "firstEpisode",
|
||||
},
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user