@vyla-entertainment/sdk 1.19.0 → 1.20.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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vyla-entertainment/sdk",
3
- "version": "1.19.0",
3
+ "version": "1.20.0",
4
4
  "scripts": {
5
5
  "test": "node test/index.js"
6
6
  },
package/src/config.js CHANGED
@@ -187,6 +187,18 @@ export const SOURCES = [
187
187
  }],
188
188
  },
189
189
 
190
+ {
191
+ key: 'frost',
192
+ label: 'FrostStream',
193
+ sourceFile: 'frost',
194
+ proxyParam: 'fst',
195
+ timeout: 25000,
196
+ jitter: 500,
197
+ retries: 2,
198
+ multiUrl: true,
199
+ skipProxy: true,
200
+ },
201
+
190
202
  {
191
203
  key: 'fsonline',
192
204
  label: 'FSOnline',
@@ -199,6 +211,18 @@ export const SOURCES = [
199
211
  skipProxy: true,
200
212
  },
201
213
 
214
+ {
215
+ key: 'hdhub',
216
+ label: 'HDHub',
217
+ sourceFile: 'hdhub',
218
+ proxyParam: 'hdh',
219
+ timeout: 25000,
220
+ jitter: 500,
221
+ retries: 2,
222
+ multiUrl: true,
223
+ skipProxy: true,
224
+ },
225
+
202
226
  {
203
227
  key: 'hexa',
204
228
  label: 'Hexa',
@@ -608,6 +632,18 @@ export const SOURCES = [
608
632
  },
609
633
  },
610
634
 
635
+ {
636
+ key: 'watchout',
637
+ label: 'Watchout',
638
+ sourceFile: 'watchout',
639
+ proxyParam: 'wo',
640
+ timeout: 25000,
641
+ jitter: 500,
642
+ retries: 2,
643
+ multiUrl: true,
644
+ skipProxy: true,
645
+ },
646
+
611
647
  {
612
648
  key: 'xdownloader',
613
649
  label: 'XDownloader',
@@ -0,0 +1,30 @@
1
+ import { fetchJson, resolveImdbId } from '../utils/helpers.js';
2
+
3
+ export async function getStream({ id, s, e, tmdbApiKey, sdk }) {
4
+ const isTv = s != null && e != null;
5
+ const type = isTv ? 'series' : 'movie';
6
+ const imdb = await resolveImdbId(id, isTv, tmdbApiKey || sdk?.tmdbApiKey);
7
+ if (!imdb) return null;
8
+
9
+ const url = isTv
10
+ ? `https://froststream.cloutteam.com/stream/series/${imdb}:${s}:${e}.json`
11
+ : `https://froststream.cloutteam.com/stream/movie/${imdb}.json`;
12
+
13
+ const res = await fetchJson(url).catch(() => null);
14
+ if (!res || !Array.isArray(res.streams) || !res.streams.length) return null;
15
+
16
+ const allUrls = res.streams.filter(st => st.url).map(st => ({
17
+ url: st.url,
18
+ server: `Frost - ${st.name || 'Server'} ${st.title ? `- ${st.title}` : ''}`,
19
+ headers: st.behaviorHints?.proxyHeaders?.request || undefined,
20
+ skipProxy: st.behaviorHints?.notWebReady === false
21
+ }));
22
+
23
+ if (!allUrls.length) return null;
24
+
25
+ return {
26
+ url: allUrls[0].url,
27
+ headers: allUrls[0].headers,
28
+ allUrls
29
+ };
30
+ }
@@ -0,0 +1,36 @@
1
+ import { fetchJson, resolveImdbId } from '../utils/helpers.js';
2
+
3
+ export async function getStream({ id, s, e, tmdbApiKey, sdk }) {
4
+ const isTv = s != null && e != null;
5
+ const type = isTv ? 'series' : 'movie';
6
+ const imdb = await resolveImdbId(id, isTv, tmdbApiKey || sdk?.tmdbApiKey);
7
+ if (!imdb) return null;
8
+
9
+ const CONFIG = btoa(JSON.stringify({ "torbox": "unset", "qualities": "2160p,1080p,720p", "sort": "desc", "catalogs": "featured,popular" }));
10
+ const url = `https://hdhub.thevolecitor.qzz.io/${CONFIG}/stream/${type}/${imdb}${isTv ? `:${s}:${e}` : ""}.json`;
11
+
12
+ const res = await fetchJson(url).catch(() => null);
13
+ if (!res || !Array.isArray(res.streams) || !res.streams.length) return null;
14
+
15
+ const validStreams = res.streams.filter(st => {
16
+ if (!st.url || !st.url.trim()) return false;
17
+ const lower = st.url.toLowerCase();
18
+ if (lower.includes('hubcloud') || lower.includes('pixeldrain.dev') || lower.endsWith('.zip')) return false;
19
+ return true;
20
+ });
21
+
22
+ if (!validStreams.length) return null;
23
+
24
+ const allUrls = validStreams.map(st => ({
25
+ url: st.url,
26
+ server: `HDHub - ${st.name || 'Server'}`,
27
+ headers: st.behaviorHints?.proxyHeaders?.request || undefined,
28
+ skipProxy: st.behaviorHints?.notWebReady === false
29
+ }));
30
+
31
+ return {
32
+ url: allUrls[0].url,
33
+ headers: allUrls[0].headers,
34
+ allUrls
35
+ };
36
+ }
@@ -0,0 +1,46 @@
1
+ import { fetchJson, fetchText } from '../utils/helpers.js';
2
+
3
+ const API_URL = "https://raw.githubusercontent.com/Watchout2025/api/refs/heads/main/hls/";
4
+
5
+ export async function getStream({ id, s, e }) {
6
+ const isTv = s != null && e != null;
7
+ const type = isTv ? 'tv' : 'movie';
8
+
9
+ const targetUrl = isTv
10
+ ? `${API_URL}tv/${id}/S${s}.json`
11
+ : `${API_URL}movie/${id}`;
12
+
13
+ const headers = {
14
+ 'Origin': 'https://vidout.pages.dev',
15
+ 'Referer': 'https://vidout.pages.dev'
16
+ };
17
+
18
+ if (type === 'movie') {
19
+ const data = await fetchText(targetUrl).catch(() => null);
20
+ if (!data || !data.includes('://')) return null;
21
+
22
+ return {
23
+ url: data.trim(),
24
+ headers,
25
+ allUrls: [{
26
+ url: data.trim(),
27
+ server: 'Watchout - Direct',
28
+ headers
29
+ }]
30
+ };
31
+ } else {
32
+ const data = await fetchJson(targetUrl).catch(() => null);
33
+ const streamUrl = data?.[String(e)] || null;
34
+ if (!streamUrl) return null;
35
+
36
+ return {
37
+ url: streamUrl,
38
+ headers,
39
+ allUrls: [{
40
+ url: streamUrl,
41
+ server: 'Watchout - Direct',
42
+ headers
43
+ }]
44
+ };
45
+ }
46
+ }
@@ -52,6 +52,23 @@ function pruneHelperCache(cache) {
52
52
  }
53
53
  }
54
54
 
55
+ export async function resolveImdbId(id, isTv, tmdbApiKey) {
56
+ if (typeof id === 'string' && id.startsWith('tt')) return id;
57
+ const apiKey = tmdbApiKey || process.env.TMDB_API_KEY;
58
+ if (!apiKey) return `tt${id}`;
59
+ const type = isTv ? 'tv' : 'movie';
60
+ try {
61
+ const res = await fetch(`https://api.themoviedb.org/3/${type}/${id}?api_key=${apiKey}&append_to_response=external_ids`, {
62
+ signal: AbortSignal.timeout(5000),
63
+ });
64
+ if (!res.ok) return `tt${id}`;
65
+ const data = await res.json();
66
+ return data.imdb_id || data.external_ids?.imdb_id || `tt${id}`;
67
+ } catch {
68
+ return `tt${id}`;
69
+ }
70
+ }
71
+
55
72
  setInterval(() => {
56
73
  pruneHelperCache(tmdbValidationCache);
57
74
  pruneHelperCache(tmdbInfoCache);