@vyla-entertainment/sdk 1.20.0 → 1.22.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +3 -2
- package/src/config.js +99 -67
- package/src/health.js +60 -20
- package/src/sdk.d.ts +94 -121
- package/src/sdk.js +82 -78
- package/src/sources/111477.js +88 -100
- package/src/sources/123anime.js +120 -56
- package/src/sources/3eyedraven.js +82 -135
- package/src/sources/4movies.js +77 -0
- package/src/sources/aether.js +99 -0
- package/src/sources/castle.js +415 -0
- package/src/sources/cinecat.js +37 -18
- package/src/sources/cinemaarmy.js +179 -180
- package/src/sources/cinesrc.js +401 -397
- package/src/sources/cno.js +101 -94
- package/src/sources/dulo.js +134 -149
- package/src/sources/flaxmovies.js +114 -105
- package/src/sources/framextv.js +126 -0
- package/src/sources/frost.js +38 -29
- package/src/sources/fsonline.js +95 -47
- package/src/sources/hdhub.js +43 -36
- package/src/sources/hexa.js +60 -53
- package/src/sources/hyper.js +42 -35
- package/src/sources/kickassanime.js +117 -124
- package/src/sources/kisskh.js +114 -59
- package/src/sources/lmscript.js +72 -70
- package/src/sources/lookmovie.js +80 -79
- package/src/sources/meowtv.js +140 -0
- package/src/sources/movenerds.js +74 -124
- package/src/sources/movy.js +197 -209
- package/src/sources/net79.js +59 -55
- package/src/sources/peestream.js +126 -138
- package/src/sources/pengu.js +46 -49
- package/src/sources/pstream.js +73 -67
- package/src/sources/purstream.js +96 -104
- package/src/sources/rivestream.js +182 -176
- package/src/sources/rivo.js +58 -53
- package/src/sources/streamaggregator.js +114 -128
- package/src/sources/thugtv.js +70 -62
- package/src/sources/vidapi.js +122 -114
- package/src/sources/vidcore.js +14 -122
- package/src/sources/vidfast.js +14 -122
- package/src/sources/vidlink.js +78 -27
- package/src/sources/vidora.js +74 -42
- package/src/sources/vidup.js +14 -122
- package/src/sources/vidvault.js +133 -187
- package/src/sources/vidy.js +192 -187
- package/src/sources/vidzee.js +189 -183
- package/src/sources/vixsrc.js +123 -113
- package/src/sources/watchout.js +60 -46
- package/src/sources/xdownloader.js +127 -128
- package/src/sources/yapgrid.js +68 -62
- package/src/sources/yastream.js +35 -29
- package/src/subtitles.js +105 -122
- package/src/utils/helpers.js +586 -247
- package/src/sources/bcine.js +0 -202
- package/src/sources/cinezo.js +0 -55
- package/src/sources/vidrock.js +0 -145
package/package.json
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vyla-entertainment/sdk",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.22.0",
|
|
4
4
|
"scripts": {
|
|
5
|
-
"test": "node test/index.js"
|
|
5
|
+
"test": "node test/index.js",
|
|
6
|
+
"test:all": "node test/index.js all"
|
|
6
7
|
},
|
|
7
8
|
"author": "vyla-entertainment",
|
|
8
9
|
"contributors": [
|
package/src/config.js
CHANGED
|
@@ -18,6 +18,25 @@ export const SOURCES = [
|
|
|
18
18
|
}],
|
|
19
19
|
},
|
|
20
20
|
|
|
21
|
+
{
|
|
22
|
+
key: '4movies',
|
|
23
|
+
label: '4Movies',
|
|
24
|
+
sourceFile: '4movies',
|
|
25
|
+
proxyParam: '4m',
|
|
26
|
+
timeout: 25000,
|
|
27
|
+
jitter: 500,
|
|
28
|
+
retries: 2,
|
|
29
|
+
multiUrl: true,
|
|
30
|
+
skipProxy: true,
|
|
31
|
+
cdnHeaders: [{
|
|
32
|
+
pattern: /4movie\.in|aapanel\.devcorp\.me/i,
|
|
33
|
+
headers: {
|
|
34
|
+
Referer: 'https://4movie.in/',
|
|
35
|
+
Origin: 'https://4movie.in',
|
|
36
|
+
},
|
|
37
|
+
}],
|
|
38
|
+
},
|
|
39
|
+
|
|
21
40
|
{
|
|
22
41
|
key: '123anime',
|
|
23
42
|
label: '123Anime',
|
|
@@ -57,23 +76,36 @@ export const SOURCES = [
|
|
|
57
76
|
},
|
|
58
77
|
|
|
59
78
|
{
|
|
60
|
-
key: '
|
|
61
|
-
label: '
|
|
62
|
-
sourceFile: '
|
|
63
|
-
proxyParam: '
|
|
79
|
+
key: 'aether',
|
|
80
|
+
label: 'Aether',
|
|
81
|
+
sourceFile: 'aether',
|
|
82
|
+
proxyParam: 'aet',
|
|
64
83
|
timeout: 25000,
|
|
65
84
|
jitter: 500,
|
|
66
85
|
retries: 2,
|
|
67
86
|
multiUrl: true,
|
|
87
|
+
skipProxy: true,
|
|
68
88
|
cdnHeaders: [{
|
|
69
|
-
pattern: /
|
|
89
|
+
pattern: /raccoonunbutteredbagel\.zip|1x2\.space|kaxate\.fun|mechanicalserenity\.xyz|reelvault\.click|visionaryfounderslab\.site|goldenkite\.top|aether\.ist/i,
|
|
70
90
|
headers: {
|
|
71
|
-
Referer: 'https://
|
|
72
|
-
Origin: 'https://
|
|
91
|
+
Referer: 'https://aether.st/',
|
|
92
|
+
Origin: 'https://aether.st',
|
|
73
93
|
},
|
|
74
94
|
}],
|
|
75
95
|
},
|
|
76
96
|
|
|
97
|
+
{
|
|
98
|
+
key: 'castle',
|
|
99
|
+
label: 'Castle',
|
|
100
|
+
sourceFile: 'castle',
|
|
101
|
+
proxyParam: 'cst',
|
|
102
|
+
timeout: 25000,
|
|
103
|
+
jitter: 500,
|
|
104
|
+
retries: 2,
|
|
105
|
+
multiUrl: true,
|
|
106
|
+
skipProxy: true,
|
|
107
|
+
},
|
|
108
|
+
|
|
77
109
|
{
|
|
78
110
|
key: 'cinemaarmy',
|
|
79
111
|
label: 'CinemaArmy',
|
|
@@ -112,24 +144,6 @@ export const SOURCES = [
|
|
|
112
144
|
}],
|
|
113
145
|
},
|
|
114
146
|
|
|
115
|
-
{
|
|
116
|
-
key: 'cinezo',
|
|
117
|
-
label: 'Cinezo',
|
|
118
|
-
sourceFile: 'cinezo',
|
|
119
|
-
proxyParam: 'czo',
|
|
120
|
-
timeout: 25000,
|
|
121
|
-
jitter: 500,
|
|
122
|
-
retries: 2,
|
|
123
|
-
multiUrl: true,
|
|
124
|
-
cdnHeaders: [{
|
|
125
|
-
pattern: /yenime\.net|flikhub\.net|hakunaymatata\.com/i,
|
|
126
|
-
headers: {
|
|
127
|
-
Referer: 'https://player.cinezo.live/',
|
|
128
|
-
Origin: 'https://player.cinezo.live',
|
|
129
|
-
},
|
|
130
|
-
}],
|
|
131
|
-
},
|
|
132
|
-
|
|
133
147
|
{
|
|
134
148
|
key: 'cno',
|
|
135
149
|
label: 'Cno',
|
|
@@ -187,6 +201,25 @@ export const SOURCES = [
|
|
|
187
201
|
}],
|
|
188
202
|
},
|
|
189
203
|
|
|
204
|
+
{
|
|
205
|
+
key: 'framextv',
|
|
206
|
+
label: 'FrameXTV',
|
|
207
|
+
sourceFile: 'framextv',
|
|
208
|
+
proxyParam: 'fxt',
|
|
209
|
+
timeout: 25000,
|
|
210
|
+
jitter: 500,
|
|
211
|
+
retries: 2,
|
|
212
|
+
multiUrl: true,
|
|
213
|
+
skipProxy: true,
|
|
214
|
+
cdnHeaders: [{
|
|
215
|
+
pattern: /framextv\.cc|streamos\.top|workers\.dev|films365\.org/i,
|
|
216
|
+
headers: {
|
|
217
|
+
Referer: 'https://framextv.cc/',
|
|
218
|
+
Origin: 'https://framextv.cc',
|
|
219
|
+
},
|
|
220
|
+
}],
|
|
221
|
+
},
|
|
222
|
+
|
|
190
223
|
{
|
|
191
224
|
key: 'frost',
|
|
192
225
|
label: 'FrostStream',
|
|
@@ -314,6 +347,25 @@ export const SOURCES = [
|
|
|
314
347
|
},
|
|
315
348
|
},
|
|
316
349
|
|
|
350
|
+
{
|
|
351
|
+
key: 'meowtv',
|
|
352
|
+
label: 'MeowTV',
|
|
353
|
+
sourceFile: 'meowtv',
|
|
354
|
+
proxyParam: 'mtv',
|
|
355
|
+
timeout: 25000,
|
|
356
|
+
jitter: 500,
|
|
357
|
+
retries: 2,
|
|
358
|
+
multiUrl: true,
|
|
359
|
+
skipProxy: true,
|
|
360
|
+
cdnHeaders: [{
|
|
361
|
+
pattern: /meowtv\.ru/i,
|
|
362
|
+
headers: {
|
|
363
|
+
Referer: 'https://meowtv.ru/',
|
|
364
|
+
Origin: 'https://meowtv.ru',
|
|
365
|
+
},
|
|
366
|
+
}],
|
|
367
|
+
},
|
|
368
|
+
|
|
317
369
|
{
|
|
318
370
|
key: 'movenerds',
|
|
319
371
|
label: 'MoverNerds',
|
|
@@ -361,14 +413,6 @@ export const SOURCES = [
|
|
|
361
413
|
jitter: 500,
|
|
362
414
|
retries: 2,
|
|
363
415
|
multiUrl: true,
|
|
364
|
-
skipProxy: true,
|
|
365
|
-
cdnHeaders: [{
|
|
366
|
-
pattern: /hakunaymatata\.com/i,
|
|
367
|
-
headers: {
|
|
368
|
-
Referer: 'https://net79.cc/',
|
|
369
|
-
Origin: 'https://net79.cc',
|
|
370
|
-
},
|
|
371
|
-
}],
|
|
372
416
|
},
|
|
373
417
|
|
|
374
418
|
{
|
|
@@ -381,7 +425,7 @@ export const SOURCES = [
|
|
|
381
425
|
retries: 1,
|
|
382
426
|
multiUrl: true,
|
|
383
427
|
skipProxy: true,
|
|
384
|
-
disabled: false,
|
|
428
|
+
disabled: false,
|
|
385
429
|
},
|
|
386
430
|
|
|
387
431
|
{
|
|
@@ -493,7 +537,16 @@ export const SOURCES = [
|
|
|
493
537
|
jitter: 500,
|
|
494
538
|
retries: 1,
|
|
495
539
|
multiUrl: true,
|
|
540
|
+
skipProxy: true,
|
|
541
|
+
cdnHeaders: [{
|
|
542
|
+
pattern: /vidcore\.io/i,
|
|
543
|
+
headers: {
|
|
544
|
+
Referer: 'https://vidcore.io/',
|
|
545
|
+
Origin: 'https://vidcore.io',
|
|
546
|
+
},
|
|
547
|
+
}],
|
|
496
548
|
},
|
|
549
|
+
|
|
497
550
|
{
|
|
498
551
|
key: 'vidfast',
|
|
499
552
|
label: 'VidFast',
|
|
@@ -505,25 +558,6 @@ export const SOURCES = [
|
|
|
505
558
|
multiUrl: true,
|
|
506
559
|
},
|
|
507
560
|
|
|
508
|
-
{
|
|
509
|
-
key: 'vidora',
|
|
510
|
-
label: 'Vidora',
|
|
511
|
-
sourceFile: 'vidora',
|
|
512
|
-
proxyParam: 'vdra',
|
|
513
|
-
timeout: 25000,
|
|
514
|
-
jitter: 500,
|
|
515
|
-
retries: 2,
|
|
516
|
-
multiUrl: true,
|
|
517
|
-
skipProxy: true,
|
|
518
|
-
cdnHeaders: [{
|
|
519
|
-
pattern: /rousav\.tech|vidbolt\.xyz|vidrift\.in|goldenkite\.top|ravok\.buzz/i,
|
|
520
|
-
headers: {
|
|
521
|
-
Referer: 'https://vidora-3l2w.onrender.com/',
|
|
522
|
-
Origin: 'https://vidora-3l2w.onrender.com',
|
|
523
|
-
},
|
|
524
|
-
}],
|
|
525
|
-
},
|
|
526
|
-
|
|
527
561
|
{
|
|
528
562
|
key: 'vidlink',
|
|
529
563
|
label: 'Vidlink',
|
|
@@ -532,28 +566,26 @@ export const SOURCES = [
|
|
|
532
566
|
timeout: 20000,
|
|
533
567
|
jitter: 500,
|
|
534
568
|
retries: 2,
|
|
535
|
-
skipProxy: true,
|
|
536
569
|
multiUrl: true,
|
|
537
570
|
},
|
|
538
571
|
|
|
539
572
|
{
|
|
540
|
-
key: '
|
|
541
|
-
label: '
|
|
542
|
-
sourceFile: '
|
|
543
|
-
proxyParam: '
|
|
544
|
-
timeout:
|
|
545
|
-
jitter:
|
|
546
|
-
retries:
|
|
573
|
+
key: 'vidora',
|
|
574
|
+
label: 'Vidora',
|
|
575
|
+
sourceFile: 'vidora',
|
|
576
|
+
proxyParam: 'vd',
|
|
577
|
+
timeout: 25000,
|
|
578
|
+
jitter: 500,
|
|
579
|
+
retries: 2,
|
|
547
580
|
multiUrl: true,
|
|
581
|
+
skipProxy: true,
|
|
548
582
|
cdnHeaders: [{
|
|
549
|
-
pattern:
|
|
583
|
+
pattern: /vidoraplayer\.duckdns\.org/i,
|
|
550
584
|
headers: {
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
Referer: 'https://vidrock.ru/',
|
|
554
|
-
Origin: 'https://vidrock.ru',
|
|
585
|
+
Referer: 'https://vidoraplayer.duckdns.org/',
|
|
586
|
+
Origin: 'https://vidoraplayer.duckdns.org',
|
|
555
587
|
},
|
|
556
|
-
}
|
|
588
|
+
}],
|
|
557
589
|
},
|
|
558
590
|
|
|
559
591
|
{
|
package/src/health.js
CHANGED
|
@@ -1,6 +1,15 @@
|
|
|
1
|
-
import { HEALTH_PROBE_ID } from "./config.js";
|
|
2
1
|
|
|
3
|
-
const
|
|
2
|
+
const MOVIE_PROBE_ID = "936075";
|
|
3
|
+
const TV_PROBE_ID = "37854";
|
|
4
|
+
const TV_PROBE_SEASON = "1";
|
|
5
|
+
const TV_PROBE_EPISODE = "1";
|
|
6
|
+
|
|
7
|
+
const withTimeout = (promise, ms) =>
|
|
8
|
+
Promise.race([
|
|
9
|
+
promise,
|
|
10
|
+
new Promise(resolve => setTimeout(() => resolve(null), ms))
|
|
11
|
+
]);
|
|
12
|
+
|
|
4
13
|
async function withRetry(fn, attempts = 2, delay = 300) {
|
|
5
14
|
for (let i = 0; i < attempts; i++) {
|
|
6
15
|
try {
|
|
@@ -8,31 +17,62 @@ async function withRetry(fn, attempts = 2, delay = 300) {
|
|
|
8
17
|
if (result != null) return result;
|
|
9
18
|
} catch (err) {
|
|
10
19
|
if (i === attempts - 1) throw err;
|
|
11
|
-
await new Promise(
|
|
20
|
+
await new Promise(resolve =>
|
|
21
|
+
setTimeout(resolve, delay + Math.random() * delay * 0.5)
|
|
22
|
+
);
|
|
12
23
|
}
|
|
13
24
|
}
|
|
14
25
|
return null;
|
|
15
26
|
}
|
|
16
27
|
|
|
28
|
+
function hasStream(result) {
|
|
29
|
+
const urls = [
|
|
30
|
+
result?.url,
|
|
31
|
+
...(result?.allUrls || []).map(item => item?.url)
|
|
32
|
+
];
|
|
33
|
+
|
|
34
|
+
return urls.some(url =>
|
|
35
|
+
typeof url === "string" && url.startsWith("http")
|
|
36
|
+
);
|
|
37
|
+
}
|
|
38
|
+
|
|
17
39
|
export async function probeSource(sdk, cfg, mod) {
|
|
18
|
-
const audio = /dub$/.test(cfg.key) ?
|
|
19
|
-
const
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
40
|
+
const audio = /dub$/.test(cfg.key) ? "dub" : "sub";
|
|
41
|
+
const start = Date.now();
|
|
42
|
+
|
|
43
|
+
const test = async (id, s = null, e = null) => {
|
|
44
|
+
const streamArgs = {
|
|
45
|
+
id,
|
|
46
|
+
s,
|
|
47
|
+
e,
|
|
48
|
+
clientIP: null,
|
|
49
|
+
absoluteBase: null,
|
|
50
|
+
audio,
|
|
51
|
+
sdk,
|
|
52
|
+
config: cfg,
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
const result = await withTimeout(
|
|
56
|
+
withRetry(
|
|
57
|
+
() => mod.getStream(streamArgs),
|
|
58
|
+
cfg.retries,
|
|
59
|
+
300
|
|
60
|
+
),
|
|
61
|
+
cfg.timeout
|
|
62
|
+
);
|
|
63
|
+
|
|
64
|
+
return hasStream(result);
|
|
28
65
|
};
|
|
29
66
|
|
|
30
|
-
const
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
);
|
|
67
|
+
const [movie, tv] = await Promise.all([
|
|
68
|
+
test(MOVIE_PROBE_ID),
|
|
69
|
+
test(TV_PROBE_ID, TV_PROBE_SEASON, TV_PROBE_EPISODE)
|
|
70
|
+
]);
|
|
35
71
|
|
|
36
|
-
|
|
37
|
-
|
|
72
|
+
return {
|
|
73
|
+
ok: movie || tv,
|
|
74
|
+
movie,
|
|
75
|
+
tv,
|
|
76
|
+
ms: Date.now() - start
|
|
77
|
+
};
|
|
38
78
|
}
|
package/src/sdk.d.ts
CHANGED
|
@@ -1,122 +1,95 @@
|
|
|
1
|
-
export interface SourceConfig {
|
|
2
|
-
key: string;
|
|
3
|
-
label: string;
|
|
4
|
-
sourceFile: string;
|
|
5
|
-
proxyParam: string;
|
|
6
|
-
timeout: number;
|
|
7
|
-
jitter: number;
|
|
8
|
-
retries: number;
|
|
9
|
-
multiUrl: boolean;
|
|
10
|
-
skipProxy?: boolean;
|
|
11
|
-
cdnHeaders?: {
|
|
12
|
-
pattern: RegExp;
|
|
13
|
-
headers: {
|
|
14
|
-
Referer: string;
|
|
15
|
-
Origin: string;
|
|
16
|
-
};
|
|
17
|
-
}[];
|
|
18
|
-
skipVerify?: boolean;
|
|
19
|
-
verifyHeaders?: boolean;
|
|
20
|
-
disabled?: boolean;
|
|
21
|
-
sourcesTimeout?: number;
|
|
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
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
e?: number | null,
|
|
96
|
-
clientIP?: string | null
|
|
97
|
-
): Promise<StreamResult | { allUrls: StreamResult[] }>;
|
|
98
|
-
|
|
99
|
-
/**
|
|
100
|
-
* Get subtitles for a movie or TV episode.
|
|
101
|
-
* @param id Media id
|
|
102
|
-
* @param s Season number (for TV), or null for movies
|
|
103
|
-
* @param e Episode number (for TV), or null for movies
|
|
104
|
-
*/
|
|
105
|
-
getSubtitles(
|
|
106
|
-
id: string | number,
|
|
107
|
-
s?: number | null,
|
|
108
|
-
e?: number | null
|
|
109
|
-
): Promise<SubtitleResult[]>;
|
|
110
|
-
|
|
111
|
-
/**
|
|
112
|
-
* Get download links for a movie or TV episode.
|
|
113
|
-
* @param id Media id
|
|
114
|
-
* @param s Season number (for TV), or null for movies
|
|
115
|
-
* @param e Episode number (for TV), or null for movies
|
|
116
|
-
*/
|
|
117
|
-
getDownloads(
|
|
118
|
-
id: string | number,
|
|
119
|
-
s?: number | null,
|
|
120
|
-
e?: number | null
|
|
121
|
-
): Promise<DownloadResult[]>;
|
|
1
|
+
export interface SourceConfig {
|
|
2
|
+
key: string;
|
|
3
|
+
label: string;
|
|
4
|
+
sourceFile: string;
|
|
5
|
+
proxyParam: string;
|
|
6
|
+
timeout: number;
|
|
7
|
+
jitter: number;
|
|
8
|
+
retries: number;
|
|
9
|
+
multiUrl: boolean;
|
|
10
|
+
skipProxy?: boolean;
|
|
11
|
+
cdnHeaders?: {
|
|
12
|
+
pattern: RegExp;
|
|
13
|
+
headers: {
|
|
14
|
+
Referer: string;
|
|
15
|
+
Origin: string;
|
|
16
|
+
};
|
|
17
|
+
}[];
|
|
18
|
+
skipVerify?: boolean;
|
|
19
|
+
verifyHeaders?: boolean;
|
|
20
|
+
disabled?: boolean;
|
|
21
|
+
sourcesTimeout?: number;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export interface ProbeResult {
|
|
25
|
+
ok: boolean;
|
|
26
|
+
ms: number | null;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export interface StreamResult {
|
|
30
|
+
url: string;
|
|
31
|
+
headers: {
|
|
32
|
+
"User-Agent": string;
|
|
33
|
+
Referer: string;
|
|
34
|
+
Origin: string;
|
|
35
|
+
[key: string]: string;
|
|
36
|
+
};
|
|
37
|
+
server: string;
|
|
38
|
+
quality: string;
|
|
39
|
+
type: "mp4" | "hls";
|
|
40
|
+
skipVerify?: boolean;
|
|
41
|
+
skipProxy?: boolean;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export interface DownloadResult {
|
|
45
|
+
url: string;
|
|
46
|
+
quality: string;
|
|
47
|
+
size: number | null;
|
|
48
|
+
type: "mkv";
|
|
49
|
+
active: boolean;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export interface SubtitleResult {
|
|
53
|
+
label: string;
|
|
54
|
+
file: string;
|
|
55
|
+
type: "vtt" | "srt";
|
|
56
|
+
source: string;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export type ProbeAllResult = Record<string, ProbeResult>;
|
|
60
|
+
|
|
61
|
+
export interface VylaSDKOptions {
|
|
62
|
+
tmdbApiKey?: string;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export default class VylaSDK {
|
|
66
|
+
tmdbApiKey?: string;
|
|
67
|
+
|
|
68
|
+
constructor(options?: VylaSDKOptions);
|
|
69
|
+
|
|
70
|
+
getSources(excludeDisabled?: boolean): SourceConfig[];
|
|
71
|
+
|
|
72
|
+
probeAllSources(): Promise<ProbeAllResult>;
|
|
73
|
+
|
|
74
|
+
probeSource(key: string): Promise<ProbeResult>;
|
|
75
|
+
|
|
76
|
+
getStream(
|
|
77
|
+
key: string,
|
|
78
|
+
id: string | number,
|
|
79
|
+
s?: number | null,
|
|
80
|
+
e?: number | null,
|
|
81
|
+
clientIP?: string | null
|
|
82
|
+
): Promise<StreamResult | { allUrls: StreamResult[] }>;
|
|
83
|
+
|
|
84
|
+
getSubtitles(
|
|
85
|
+
id: string | number,
|
|
86
|
+
s?: number | null,
|
|
87
|
+
e?: number | null
|
|
88
|
+
): Promise<SubtitleResult[]>;
|
|
89
|
+
|
|
90
|
+
getDownloads(
|
|
91
|
+
id: string | number,
|
|
92
|
+
s?: number | null,
|
|
93
|
+
e?: number | null
|
|
94
|
+
): Promise<DownloadResult[]>;
|
|
122
95
|
}
|