forked from Davenchy/live-torrent
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtypes.d.ts
77 lines (70 loc) · 1.61 KB
/
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
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
/** torrent file in form of json object */
export interface TorrentFileInfo {
/** the name of the file including the extension */
name: string
/** the full path of the file inside the torrent files tree */
path: string
/** the mime type of the file */
type: string
/** the file size in bytes */
size: number
/** the number of downloaded bytes */
downloaded: number
}
/** torrent file info in form of json object */
export interface TorrentInfo {
/** the torrent name */
name: string
/** the torrent info hash */
infoHash: string
/** number of the peers sharing the torrent file content */
peers: number
/** the total files size in bytes */
size: number
/** the total downloaded bytes */
downloaded: number
/** list of files in the torrent */
files: TorrentFileInfo[]
}
export interface YtsResponse<T> {
status: string
status_message: string
data: T
}
export interface YtsSearchResult {
movie_count: number
limit: number
page_number: number
movies: YtsMovie[]
}
export interface YtsMovieResult {
movie: YtsMovie
}
export interface YtsMovie {
id: number
url: string
imdb_code: string
title: string
year: number
rating: number
runtime: number
language: string
genres: string[]
summary: string
description_full: string
background_image: string
small_cover_image: string
large_cover_image: string
torrents: YtsTorrent[]
}
export type YtsTorrentQuality = "480p" | "720p" | "1080p" | "2160p" | "3D"
export type YtsTorrentType = "web" | "bluray"
export interface YtsTorrent {
hash: string
quality: YtsTorrentQuality
size: number
size_bytes: number
type: YtsTorrentType
seeds: number
peers: number
}