mirror of
https://github.com/zoriya/Kyoo.git
synced 2025-06-03 05:34:23 -04:00
Fix with=nextEntry
This commit is contained in:
parent
d6d3540b16
commit
144e08a99c
@ -39,7 +39,7 @@ const nextupSort = Sort(
|
|||||||
lastPlayed: watchlist.lastPlayedAt,
|
lastPlayed: watchlist.lastPlayedAt,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
default: ["lastPlayed"],
|
default: ["-lastPlayed"],
|
||||||
tablePk: entries.pk,
|
tablePk: entries.pk,
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
@ -85,7 +85,6 @@ export const nextup = new Elysia({ tags: ["profiles"] })
|
|||||||
const { pk, name, ...transCol } = getColumns(transQ);
|
const { pk, name, ...transCol } = getColumns(transQ);
|
||||||
|
|
||||||
const {
|
const {
|
||||||
kind,
|
|
||||||
externalId,
|
externalId,
|
||||||
order,
|
order,
|
||||||
seasonNumber,
|
seasonNumber,
|
||||||
@ -100,6 +99,8 @@ export const nextup = new Elysia({ tags: ["profiles"] })
|
|||||||
...transCol,
|
...transCol,
|
||||||
videos: entryVideosQ.videos,
|
videos: entryVideosQ.videos,
|
||||||
progress: mapProgress({ aliased: true }),
|
progress: mapProgress({ aliased: true }),
|
||||||
|
// specials don't have an `episodeNumber` but a `number` field.
|
||||||
|
number: episodeNumber,
|
||||||
|
|
||||||
// assign more restrained types to make typescript happy.
|
// assign more restrained types to make typescript happy.
|
||||||
externalId: sql<any>`${externalId}`,
|
externalId: sql<any>`${externalId}`,
|
||||||
|
@ -196,11 +196,7 @@ const showRelations = {
|
|||||||
.limit(1)
|
.limit(1)
|
||||||
.as("firstEntry");
|
.as("firstEntry");
|
||||||
},
|
},
|
||||||
nextEntry: ({
|
nextEntry: ({ languages }: { languages: string[] }) => {
|
||||||
languages,
|
|
||||||
}: {
|
|
||||||
languages: string[];
|
|
||||||
}) => {
|
|
||||||
const transQ = db
|
const transQ = db
|
||||||
.selectDistinctOn([entryTranslations.pk])
|
.selectDistinctOn([entryTranslations.pk])
|
||||||
.from(entryTranslations)
|
.from(entryTranslations)
|
||||||
|
@ -82,6 +82,7 @@ export const FullSerie = t.Intersect([
|
|||||||
translations: t.Optional(TranslationRecord(SerieTranslation)),
|
translations: t.Optional(TranslationRecord(SerieTranslation)),
|
||||||
studios: t.Optional(t.Array(Studio)),
|
studios: t.Optional(t.Array(Studio)),
|
||||||
firstEntry: t.Optional(Entry),
|
firstEntry: t.Optional(Entry),
|
||||||
|
nextEntry: t.Optional(t.Nullable(Entry)),
|
||||||
}),
|
}),
|
||||||
]);
|
]);
|
||||||
export type FullSerie = Prettify<typeof FullSerie.static>;
|
export type FullSerie = Prettify<typeof FullSerie.static>;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user