aboutsummaryrefslogtreecommitdiff
path: root/web/script/player/jhls.d.ts
diff options
context:
space:
mode:
authormetamuffin <metamuffin@disroot.org>2023-12-23 00:43:42 +0100
committermetamuffin <metamuffin@disroot.org>2023-12-23 00:43:42 +0100
commit0b53d68b214b022a4ae6292785c165ad95e71696 (patch)
tree1532b6619fd2598af1c73018b7ec339145d81602 /web/script/player/jhls.d.ts
parent75949cebdd61dd8f0d06f2e47081c460e2a442f0 (diff)
downloadjellything-0b53d68b214b022a4ae6292785c165ad95e71696.tar
jellything-0b53d68b214b022a4ae6292785c165ad95e71696.tar.bz2
jellything-0b53d68b214b022a4ae6292785c165ad95e71696.tar.zst
rework ~~import~~ system pt. 8.1: update the player to new format
Diffstat (limited to 'web/script/player/jhls.d.ts')
-rw-r--r--web/script/player/jhls.d.ts53
1 files changed, 47 insertions, 6 deletions
diff --git a/web/script/player/jhls.d.ts b/web/script/player/jhls.d.ts
index e1948ca..9938365 100644
--- a/web/script/player/jhls.d.ts
+++ b/web/script/player/jhls.d.ts
@@ -4,16 +4,57 @@
Copyright (C) 2023 metamuffin <metamuffin.org>
*/
-export interface TimeRange { start: number, end: number }
-export interface JhlsMetadata {
- tracks: JhlsTrack[],
+export interface JhlsTrackIndex {
+ segments: TimeRange[],
extra_profiles: EncodingProfile[],
+}
+
+export interface TimeRange { start: number, end: number }
+
+export interface NodePublic {
+ kind: NodeKind,
+ title?: string,
+ tagline?: string,
+ description?: string,
+ id?: string,
+ path: string[],
+ children: string[],
+ release_date?: string,
+ index?: number,
+ media?: MediaInfo,
+ ratings: { [key in Rating]: number },
+ // might be incomplete
+}
+
+export type NodeKind = "movie"
+ | "video"
+ | "collection"
+ | "channel"
+ | "show"
+ | "series"
+ | "season"
+ | "episode"
+
+export type Rating = "imdb"
+ | "tmdb"
+ | "rotten_tomatoes"
+ | "metacritic"
+ | "youtube_views"
+ | "youtube_likes"
+ | "youtube_followers"
+
+export interface MediaInfo {
duration: number,
+ tracks: SourceTrack[],
+ chapters: Chapter[],
}
-export interface JhlsTrack {
- info: SourceTrack,
- segments: TimeRange[],
+
+export interface Chapter {
+ time_start?: number,
+ time_end?: number,
+ labels: { [key: string]: string }
}
+
export interface SourceTrack {
kind: SourceTrackKind,
name: string,