mirror of
https://github.com/zoriya/Kyoo.git
synced 2026-01-21 11:25:58 -05:00
Allow entry movies to have episodeid
This commit is contained in:
parent
cc60b429b4
commit
ec659c3f2f
@ -4,8 +4,8 @@ import { bubbleImages, madeInAbyss, registerExamples } from "../examples";
|
||||
import { Progress } from "../history";
|
||||
import {
|
||||
DbMetadata,
|
||||
ExternalId,
|
||||
Image,
|
||||
MovieEpisodeId,
|
||||
Resource,
|
||||
SeedImage,
|
||||
TranslationRecord,
|
||||
@ -20,7 +20,7 @@ export const BaseMovieEntry = t.Composite(
|
||||
order: t.Number({
|
||||
description: "Absolute playback order. Can be mixed with episodes.",
|
||||
}),
|
||||
externalId: ExternalId(),
|
||||
externalId: MovieEpisodeId,
|
||||
}),
|
||||
BaseEntry(),
|
||||
],
|
||||
|
||||
@ -30,6 +30,31 @@ export const EpisodeId = t.Record(
|
||||
);
|
||||
export type EpisodeId = typeof EpisodeId.static;
|
||||
|
||||
export const MovieEpisodeId = t.Record(
|
||||
t.String(),
|
||||
t.Union([
|
||||
t.Object({
|
||||
dataId: t.String(),
|
||||
link: t.Nullable(t.String({ format: "uri" })),
|
||||
}),
|
||||
t.Object({
|
||||
serieId: t.String({
|
||||
descrpition: comment`
|
||||
Id on the external website.
|
||||
We store the serie's id because episode id are rarely stable.
|
||||
`,
|
||||
}),
|
||||
season: t.Nullable(
|
||||
t.Integer({
|
||||
description: "Null if the external website uses absolute numbering.",
|
||||
}),
|
||||
),
|
||||
episode: t.Integer(),
|
||||
link: t.Nullable(t.String({ format: "uri" })),
|
||||
}),
|
||||
]),
|
||||
);
|
||||
|
||||
export const SeasonId = t.Record(
|
||||
t.String(),
|
||||
t.Object({
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user