mirror of
https://github.com/zoriya/Kyoo.git
synced 2025-12-20 05:25:36 +00:00
Test & fix entry video join
This commit is contained in:
@@ -121,6 +121,7 @@ export const insertEntries = async (
|
||||
return {
|
||||
videoId: seed.video,
|
||||
entryPk: retEntries[i].pk,
|
||||
entrySlug: retEntries[i].slug,
|
||||
needRendering: false,
|
||||
};
|
||||
}
|
||||
@@ -128,6 +129,7 @@ export const insertEntries = async (
|
||||
return seed.videos.map((x, j) => ({
|
||||
videoId: x,
|
||||
entryPk: retEntries[i].pk,
|
||||
entrySlug: retEntries[i].slug,
|
||||
// The first video should not have a rendering.
|
||||
needRendering: j && seed.videos!.length > 1,
|
||||
}));
|
||||
@@ -142,9 +144,9 @@ export const insertEntries = async (
|
||||
db
|
||||
.select({
|
||||
entryPk: sql<number>`vids.entryPk::integer`.as("entry"),
|
||||
videoPk: sql`${videos.pk}`.as("video"),
|
||||
videoPk: videos.pk,
|
||||
slug: computeVideoSlug(
|
||||
sql`${show.slug}::text`,
|
||||
sql`vids.entrySlug::text`,
|
||||
sql`vids.needRendering::boolean`,
|
||||
),
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user