mirror of
https://github.com/zoriya/Kyoo.git
synced 2026-05-21 14:46:29 -04:00
Add basic collection routes
This commit is contained in:
@@ -5,6 +5,7 @@ import {
|
||||
ExternalId,
|
||||
Genre,
|
||||
Image,
|
||||
Language,
|
||||
Resource,
|
||||
SeedImage,
|
||||
TranslationRecord,
|
||||
@@ -25,6 +26,11 @@ const BaseCollection = t.Object({
|
||||
descrpition: "Date of the last item of the collection",
|
||||
}),
|
||||
),
|
||||
originalLanguage: t.Nullable(
|
||||
Language({
|
||||
description: "The language code this movie was made in.",
|
||||
}),
|
||||
),
|
||||
|
||||
createdAt: t.String({ format: "date-time" }),
|
||||
nextRefresh: t.String({ format: "date-time" }),
|
||||
@@ -52,6 +58,14 @@ export const Collection = t.Intersect([
|
||||
]);
|
||||
export type Collection = Prettify<typeof Collection.static>;
|
||||
|
||||
export const FullCollection = t.Intersect([
|
||||
Collection,
|
||||
t.Object({
|
||||
translations: t.Optional(TranslationRecord(CollectionTranslation)),
|
||||
}),
|
||||
]);
|
||||
export type FullCollection = Prettify<typeof FullCollection.static>;
|
||||
|
||||
export const SeedCollection = t.Intersect([
|
||||
t.Omit(BaseCollection, ["startAir", "endAir", "createdAt", "nextRefresh"]),
|
||||
t.Object({
|
||||
|
||||
@@ -18,6 +18,7 @@ export const duneCollection: SeedCollection = {
|
||||
logo: "https://image.tmdb.org/t/p/original/5nDsd3u1c6kDphbtIqkHseLg7HL.png",
|
||||
},
|
||||
},
|
||||
originalLanguage: "en",
|
||||
genres: ["adventure", "science-fiction"],
|
||||
rating: 80,
|
||||
externalId: {
|
||||
|
||||
Reference in New Issue
Block a user