-
Notifications
You must be signed in to change notification settings - Fork 0
/
types.d.ts
40 lines (35 loc) · 881 Bytes
/
types.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
type SupportedSourceDomains = "youtube" | "crunchyroll" | "disney";
type SupportedVideoTypes = "music video" | "television episode" | "movie" | "other"
export interface ScriptInfo {
source: ScriptSource;
metadata: ScriptMetadata;
scripts: ScriptData[];
}
interface ScriptSource {
url: string;
domain: SupportedSourceDomains;
id: string;
}
interface ScriptMetadata {
title: string;
creator?: string;
seriesTitle?: string;
season?: number;
episode?: number;
type: SupportedVideoTypes;
draft?: boolean;
requiresExtension?: boolean;
}
interface ScriptData {
language: "en-US";
author: string;
explicit?: boolean;
tracks: {
text: string;
timestamp: number;
}[];
}
export type ScriptListing = {
"languages": ScriptData["language"][];
file: string;
} & ScriptMetadata & ScriptSource;