-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathtypes.ts
91 lines (78 loc) · 1.71 KB
/
types.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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
import type { PlaybackDistributeAPI } from '../apis/apis.types';
export interface ISubtitle {
name: SubtitleLanguageName;
url: string;
languageId: string;
secondSubtitleURL: string;
secondSubtitlePosition: SecondSubtitlePosition;
}
export interface IEpisodeBase {
productId: string;
number: number;
seriesTitle: string;
title: string;
description: string;
coverImageURL: string;
}
export interface IEpisode extends IEpisodeBase {
urls: PlaybackDistributeAPI.TURL;
subtitles: ISubtitle[];
seriesTags: {
type: string;
tags: string[];
}[];
}
export interface ISeries {
title: string;
description: string;
coverImageURL: string;
total: number;
episodes: IEpisodeBase[];
seriesTags: {
type: string;
tags: string[];
}[];
}
export enum Quality {
'1080p' = 's1080p',
'720p' = 's720p',
'480p' = 's480p',
'240p' = 's240p'
}
export type QualityOption = keyof typeof Quality;
export enum LanguageFlagId {
TraditionalChinese = '1',
English = '3',
Indonesian = '7',
Thai = '8'
}
/** the values for MKV track */
export enum SubtitleLanguageCode {
'繁體中文' = 'chi', // 1
'English' = 'eng', // 3
'Indo' = 'ind', // 7
'ภาษาไทย' = 'tha', // 8
'Undefined' = 'und' // default
}
/** the values from API response */
export enum SubtitleLanguageName {
TraditionalChinese = '繁體中文',
English = 'English',
Indonesian = 'Indo',
Thai = 'ภาษาไทย',
}
/** the values from API response */
export enum SecondSubtitlePosition {
Top = 0
}
/** the values for SRT subtitle */
export enum SrtSubtitlePosition {
Top = 8
}
export enum Platform {
Browser = 'browser'
}
export enum PlatformFlagLabel {
Web = 'web',
Phone = 'phone'
}