mirror of
https://github.com/zoriya/Kyoo.git
synced 2026-05-13 10:52:28 -04:00
Allow no translations for seasons & entries
This commit is contained in:
+1
-1
@@ -45,7 +45,7 @@ export const base = new Elysia({ name: "base" })
|
||||
return error;
|
||||
}
|
||||
console.error(code, error);
|
||||
logger.error("Elysia encountered an error. code={code} error={error}", {
|
||||
logger.error("Elysia encountered an error. code={code} error={error.message}", {
|
||||
code: code,
|
||||
error: error,
|
||||
});
|
||||
|
||||
@@ -298,7 +298,7 @@ export async function getEntries({
|
||||
}),
|
||||
})
|
||||
.from(entries)
|
||||
.innerJoin(transQ, eq(entries.pk, transQ.pk))
|
||||
.leftJoin(transQ, eq(entries.pk, transQ.pk))
|
||||
.crossJoinLateral(entryVideosQ)
|
||||
.leftJoin(progressQ, eq(entries.pk, progressQ.entryPk))
|
||||
.where(
|
||||
|
||||
@@ -93,7 +93,7 @@ export const seasonsH = new Elysia({ tags: ["series"] })
|
||||
...transCol,
|
||||
})
|
||||
.from(seasons)
|
||||
.innerJoin(transQ, eq(seasons.pk, transQ.pk))
|
||||
.leftJoin(transQ, eq(seasons.pk, transQ.pk))
|
||||
.where(
|
||||
and(
|
||||
eq(seasons.showPk, serie.pk),
|
||||
|
||||
@@ -121,6 +121,7 @@ export const insertEntries = record(
|
||||
}));
|
||||
});
|
||||
await flushImageQueue(tx, imgQueue, 0);
|
||||
if (trans.length === 0) return ret;
|
||||
await tx
|
||||
.insert(entryTranslations)
|
||||
.select(unnestValues(trans, entryTranslations))
|
||||
|
||||
@@ -64,6 +64,7 @@ export const insertSeasons = record(
|
||||
})),
|
||||
);
|
||||
await flushImageQueue(tx, imgQueue, -10);
|
||||
if (trans.length === 0) return ret;
|
||||
await tx
|
||||
.insert(seasonTranslations)
|
||||
.select(unnestValues(trans, seasonTranslations))
|
||||
|
||||
Reference in New Issue
Block a user