mirror of
https://github.com/zoriya/Kyoo.git
synced 2025-05-31 04:04:21 -04:00
Add entries count in series
This commit is contained in:
parent
d9e3b3a94b
commit
dcf26b94cd
@ -60,6 +60,7 @@ export const seedMovie = async (
|
|||||||
startAir: bMovie.airDate,
|
startAir: bMovie.airDate,
|
||||||
nextRefresh,
|
nextRefresh,
|
||||||
collectionPk: col?.pk,
|
collectionPk: col?.pk,
|
||||||
|
entriesCount: 1,
|
||||||
...bMovie,
|
...bMovie,
|
||||||
},
|
},
|
||||||
translations,
|
translations,
|
||||||
|
@ -94,6 +94,7 @@ export const seedSerie = async (
|
|||||||
kind: "serie",
|
kind: "serie",
|
||||||
nextRefresh,
|
nextRefresh,
|
||||||
collectionPk: col?.pk,
|
collectionPk: col?.pk,
|
||||||
|
entriesCount: entries.length,
|
||||||
...serie,
|
...serie,
|
||||||
},
|
},
|
||||||
translations,
|
translations,
|
||||||
|
@ -72,6 +72,7 @@ export const shows = schema.table(
|
|||||||
collectionPk: integer().references((): AnyPgColumn => shows.pk, {
|
collectionPk: integer().references((): AnyPgColumn => shows.pk, {
|
||||||
onDelete: "set null",
|
onDelete: "set null",
|
||||||
}),
|
}),
|
||||||
|
entriesCount: integer().notNull(),
|
||||||
|
|
||||||
externalId: externalid(),
|
externalId: externalid(),
|
||||||
|
|
||||||
|
@ -45,6 +45,9 @@ const BaseSerie = t.Object({
|
|||||||
),
|
),
|
||||||
|
|
||||||
nextRefresh: t.String({ format: "date-time" }),
|
nextRefresh: t.String({ format: "date-time" }),
|
||||||
|
entriesCount: t.Integer({
|
||||||
|
description: "The number of episodes in this serie",
|
||||||
|
}),
|
||||||
|
|
||||||
externalId: ExternalId(),
|
externalId: ExternalId(),
|
||||||
});
|
});
|
||||||
@ -82,7 +85,7 @@ export const FullSerie = t.Intersect([
|
|||||||
export type FullMovie = Prettify<typeof FullSerie.static>;
|
export type FullMovie = Prettify<typeof FullSerie.static>;
|
||||||
|
|
||||||
export const SeedSerie = t.Intersect([
|
export const SeedSerie = t.Intersect([
|
||||||
t.Omit(BaseSerie, ["kind", "nextRefresh"]),
|
t.Omit(BaseSerie, ["kind", "nextRefresh", "entriesCount"]),
|
||||||
t.Object({
|
t.Object({
|
||||||
slug: t.String({ format: "slug" }),
|
slug: t.String({ format: "slug" }),
|
||||||
translations: TranslationRecord(
|
translations: TranslationRecord(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user