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