Allow no translations for seasons & entries

This commit is contained in:
Zoe Roux
2026-01-12 09:28:09 +01:00
parent 4dc0dcb9b3
commit cc60b429b4
8 changed files with 18 additions and 16 deletions
+1 -1
View File
@@ -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,
});
+1 -1
View File
@@ -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(
+1 -1
View File
@@ -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))