mirror of
https://github.com/zoriya/Kyoo.git
synced 2025-05-31 04:04:21 -04:00
Fix /movies select distinct
This commit is contained in:
parent
7fcaf6490d
commit
9fc5f8a706
@ -222,9 +222,10 @@ export const movies = new Elysia({ prefix: "/movies", tags: ["movies"] })
|
|||||||
const { kind, startAir, endAir, ...moviesCol } = getColumns(shows);
|
const { kind, startAir, endAir, ...moviesCol } = getColumns(shows);
|
||||||
|
|
||||||
const transQ = db
|
const transQ = db
|
||||||
.select()
|
.selectDistinctOn([showTranslations.pk])
|
||||||
.from(showTranslations)
|
.from(showTranslations)
|
||||||
.orderBy(
|
.orderBy(
|
||||||
|
showTranslations.pk,
|
||||||
sql`array_position(${sqlarr(langs)}, ${showTranslations.language})`,
|
sql`array_position(${sqlarr(langs)}, ${showTranslations.language})`,
|
||||||
)
|
)
|
||||||
.as("t");
|
.as("t");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user