Don't skip episodes in /api/videos/:slug?with=next

This commit is contained in:
Zoe Roux
2026-04-03 18:46:09 +02:00
parent 29f731a64c
commit 7bfe463cc2
2 changed files with 13 additions and 9 deletions
+1 -1
View File
@@ -247,7 +247,7 @@ function getNextVideoEntry({
.leftJoin(entryProgressQ, eq(entries.pk, entryProgressQ.entryPk))
.crossJoinLateral(entryVideosQ)
.leftJoin(entryVideoJoin, eq(entries.pk, entryVideoJoin.entryPk))
.innerJoin(vids, eq(vids.pk, entryVideoJoin.videoPk))
.leftJoin(vids, eq(vids.pk, entryVideoJoin.videoPk))
.where(
and(
// either way it needs to be of the same show
+12 -8
View File
@@ -16,10 +16,12 @@ export const FullVideo = t.Composite([
previous: t.Optional(
t.Nullable(
t.Object({
video: t.String({
format: "slug",
examples: ["made-in-abyss-s1e12"],
}),
video: t.Nullable(
t.String({
format: "slug",
examples: ["made-in-abyss-s1e12"],
}),
),
entry: Entry,
}),
),
@@ -27,10 +29,12 @@ export const FullVideo = t.Composite([
next: t.Optional(
t.Nullable(
t.Object({
video: t.String({
format: "slug",
examples: ["made-in-abyss-dawn-of-the-deep-soul"],
}),
video: t.Nullable(
t.String({
format: "slug",
examples: ["made-in-abyss-dawn-of-the-deep-soul"],
}),
),
entry: Entry,
}),
),