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
92
|
/*
This file is part of jellything (https://codeberg.org/metamuffin/jellything)
which is licensed under the GNU Affero General Public License (version 3); see /COPYING.
Copyright (C) 2023 metamuffin <metamuffin.org>
*/
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 Chapter {
time_start?: number,
time_end?: number,
labels: { [key: string]: string }
}
export interface SourceTrack {
kind: SourceTrackKind,
name: string,
codec: string,
language: string,
}
export interface SourceTrackKind {
video?: {
width: number,
height: number,
fps: number,
},
audio?: {
channels: number,
sample_rate: number,
bit_depth: number,
},
subtitles?: boolean, // incorrect but lazy rn
}
export interface EncodingProfile {
video?: {
codec: string,
preset: number,
bitrate: number,
width: number,
},
audio?: {
codec: string,
bitrate: number,
sample_rate?: number,
},
subtitles?: {
codec: string,
},
}
|