diff --git a/src/extractor/DoodStream.ts b/src/extractor/DoodStream.ts index 658a453..2ebf407 100644 --- a/src/extractor/DoodStream.ts +++ b/src/extractor/DoodStream.ts @@ -55,7 +55,6 @@ export class DoodStream extends Extractor { url: mp4Url, format: Format.mp4, label: this.label, - sourceId: `${this.id}_${meta.countryCodes?.join('_')}`, ttl: this.ttl, meta: { ...meta, diff --git a/src/extractor/Dropload.ts b/src/extractor/Dropload.ts index d4875a4..8ce3bc4 100644 --- a/src/extractor/Dropload.ts +++ b/src/extractor/Dropload.ts @@ -45,7 +45,6 @@ export class Dropload extends Extractor { url: playlistUrl, format: Format.hls, label: this.label, - sourceId: `${this.id}_${meta.countryCodes?.join('_')}`, ttl: this.ttl, meta: { ...meta, diff --git a/src/extractor/ExternalUrl.ts b/src/extractor/ExternalUrl.ts index 35b300f..2323f6f 100644 --- a/src/extractor/ExternalUrl.ts +++ b/src/extractor/ExternalUrl.ts @@ -20,7 +20,6 @@ export class ExternalUrl extends Extractor { format: Format.unknown, isExternal: true, label: `${url.host}`, - sourceId: `${this.id}_${meta.countryCodes?.join('_')}`, ttl: this.ttl, meta, }, diff --git a/src/extractor/Extractor.ts b/src/extractor/Extractor.ts index 7c18cc5..1195959 100644 --- a/src/extractor/Extractor.ts +++ b/src/extractor/Extractor.ts @@ -42,7 +42,6 @@ export abstract class Extractor { isExternal: true, error, label: this.formatLabel(this.label), - sourceId: `${this.id}`, meta, }, ]; diff --git a/src/extractor/ExtractorRegistry.ts b/src/extractor/ExtractorRegistry.ts index c5fc1ba..7dd7c64 100644 --- a/src/extractor/ExtractorRegistry.ts +++ b/src/extractor/ExtractorRegistry.ts @@ -54,7 +54,7 @@ export class ExtractorRegistry { this.logger.info(`Extract ${url} using ${extractor.id} extractor`, ctx); - const urlResults = await extractor.extract(ctx, normalizedUrl, { ...meta, countryCodes: meta?.countryCodes ?? [] }); + const urlResults = await extractor.extract(ctx, normalizedUrl, { ...meta, countryCodes: meta?.countryCodes ?? [], extractorId: extractor.id }); if (!urlResults.length) { await this.urlResultCache.set(cacheKey, urlResults, 43200000); // 12h diff --git a/src/extractor/Fastream.ts b/src/extractor/Fastream.ts index 41c5d85..6d45042 100644 --- a/src/extractor/Fastream.ts +++ b/src/extractor/Fastream.ts @@ -39,7 +39,6 @@ export class Fastream extends Extractor { url: playlistUrl, format: Format.hls, label: this.label, - sourceId: `${this.id}_${meta.countryCodes?.join('_')}`, ttl: this.ttl, meta: { ...meta, diff --git a/src/extractor/FileLions.ts b/src/extractor/FileLions.ts index f3e9dce..9d689c4 100644 --- a/src/extractor/FileLions.ts +++ b/src/extractor/FileLions.ts @@ -86,7 +86,6 @@ export class FileLions extends Extractor { url: await buildMediaFlowProxyExtractorStreamUrl(ctx, this.fetcher, 'FileLions', url, headers), format: Format.hls, label: this.label, - sourceId: `${this.id}_${meta.countryCodes?.join('_')}`, ttl: this.ttl, meta: { ...meta, diff --git a/src/extractor/FileMoon.ts b/src/extractor/FileMoon.ts index 25e2878..ce9aa7d 100644 --- a/src/extractor/FileMoon.ts +++ b/src/extractor/FileMoon.ts @@ -72,7 +72,6 @@ export class FileMoon extends Extractor { url: playlistUrl, format: Format.hls, label: this.label, - sourceId: `${this.id}_${meta.countryCodes?.join('_')}`, ttl: this.ttl, meta: { ...meta, diff --git a/src/extractor/KinoGer.ts b/src/extractor/KinoGer.ts index 7302693..f3b8f84 100644 --- a/src/extractor/KinoGer.ts +++ b/src/extractor/KinoGer.ts @@ -66,7 +66,6 @@ export class KinoGer extends Extractor { url: m3u8Url, format: Format.hls, label: this.label, - sourceId: `${this.id}_${meta.countryCodes?.join('_')}`, ttl: this.ttl, meta: { ...meta, diff --git a/src/extractor/LuluStream.ts b/src/extractor/LuluStream.ts index df3846a..bab2424 100644 --- a/src/extractor/LuluStream.ts +++ b/src/extractor/LuluStream.ts @@ -56,7 +56,6 @@ export class LuluStream extends Extractor { url: playlistUrl, format: Format.hls, label: this.label, - sourceId: `${this.id}_${meta.countryCodes?.join('_')}`, ttl: this.ttl, meta: { ...meta, diff --git a/src/extractor/Mixdrop.ts b/src/extractor/Mixdrop.ts index 4fb9911..6f39aaf 100644 --- a/src/extractor/Mixdrop.ts +++ b/src/extractor/Mixdrop.ts @@ -36,7 +36,6 @@ export class Mixdrop extends Extractor { url: buildMediaFlowProxyExtractorRedirectUrl(ctx, 'Mixdrop', url), format: Format.mp4, label: this.label, - sourceId: `${this.id}_${meta.countryCodes?.join('_')}`, ttl: this.ttl, meta: { ...meta, diff --git a/src/extractor/SaveFiles.ts b/src/extractor/SaveFiles.ts index d1cd441..0a4f2e9 100644 --- a/src/extractor/SaveFiles.ts +++ b/src/extractor/SaveFiles.ts @@ -38,7 +38,6 @@ export class SaveFiles extends Extractor { url: new URL(fileMatch[1] as string), format: Format.hls, label: this.label, - sourceId: `${this.id}_${meta.countryCodes?.join('_')}`, ttl: this.ttl, meta: { ...meta, diff --git a/src/extractor/StreamEmbed.ts b/src/extractor/StreamEmbed.ts index 0383df4..4d1b593 100644 --- a/src/extractor/StreamEmbed.ts +++ b/src/extractor/StreamEmbed.ts @@ -27,7 +27,6 @@ export class StreamEmbed extends Extractor { url: new URL(`/m3u8/${video.uid}/${video.md5}/master.txt?s=1&id=${video.id}&cache=${video.status}`, url.origin), format: Format.hls, label: this.label, - sourceId: `${this.id}_${meta.countryCodes?.join('_')}`, ttl: this.ttl, meta: { ...meta, diff --git a/src/extractor/Streamtape.ts b/src/extractor/Streamtape.ts index 2542b88..2b1d67f 100644 --- a/src/extractor/Streamtape.ts +++ b/src/extractor/Streamtape.ts @@ -63,7 +63,6 @@ export class Streamtape extends Extractor { url: buildMediaFlowProxyExtractorRedirectUrl(ctx, 'Streamtape', url, headers), format: Format.mp4, label: this.label, - sourceId: `${this.id}_${meta.countryCodes?.join('_')}`, ttl: this.ttl, meta: { ...meta, diff --git a/src/extractor/SuperVideo.ts b/src/extractor/SuperVideo.ts index c7fe1e4..5aff1b0 100644 --- a/src/extractor/SuperVideo.ts +++ b/src/extractor/SuperVideo.ts @@ -49,7 +49,6 @@ export class SuperVideo extends Extractor { url: m3u8Url, format: Format.hls, label: this.label, - sourceId: `${this.id}_${meta.countryCodes?.join('_')}`, ttl: this.ttl, meta: { ...meta, diff --git a/src/extractor/Uqload.ts b/src/extractor/Uqload.ts index 9175c98..b853475 100644 --- a/src/extractor/Uqload.ts +++ b/src/extractor/Uqload.ts @@ -36,7 +36,6 @@ export class Uqload extends Extractor { url: buildMediaFlowProxyExtractorRedirectUrl(ctx, 'Uqload', url), format: Format.mp4, label: this.label, - sourceId: `${this.id}_${meta.countryCodes?.join('_')}`, ttl: this.ttl, meta: { ...meta, diff --git a/src/extractor/Vidora.ts b/src/extractor/Vidora.ts index ffdf7b7..a2b43b1 100644 --- a/src/extractor/Vidora.ts +++ b/src/extractor/Vidora.ts @@ -32,7 +32,6 @@ export class Vidora extends Extractor { url: m3u8Url, format: Format.hls, label: this.label, - sourceId: `${this.id}_${meta.countryCodes?.join('_')}`, ttl: this.ttl, meta: { ...meta, diff --git a/src/extractor/VixSrc.ts b/src/extractor/VixSrc.ts index b94bb7f..e9d70d4 100644 --- a/src/extractor/VixSrc.ts +++ b/src/extractor/VixSrc.ts @@ -43,7 +43,6 @@ export class VixSrc extends Extractor { url: playlistUrl, format: Format.hls, label: this.label, - sourceId: `${this.id}_${meta.countryCodes?.join('_')}`, ttl: this.ttl, meta: { ...meta, diff --git a/src/extractor/Voe.ts b/src/extractor/Voe.ts index aa5094c..b628bd3 100644 --- a/src/extractor/Voe.ts +++ b/src/extractor/Voe.ts @@ -163,7 +163,6 @@ export class Voe extends Extractor { url: playlistUrl, format: Format.hls, label: this.label, - sourceId: `${this.id}_${meta.countryCodes?.join('_')}`, ttl: this.ttl, meta: { ...meta, diff --git a/src/extractor/YouTube.ts b/src/extractor/YouTube.ts index 7529a73..c98df51 100644 --- a/src/extractor/YouTube.ts +++ b/src/extractor/YouTube.ts @@ -25,7 +25,6 @@ export class YouTube extends Extractor { format: Format.unknown, ytId: url.searchParams.get('v') as string, label: this.label, - sourceId: `${this.id}_${meta.countryCodes?.join('_')}`, ttl: this.ttl, meta: { ...meta, diff --git a/src/extractor/__snapshots__/DoodStream.test.ts.snap b/src/extractor/__snapshots__/DoodStream.test.ts.snap index c836e01..1707eb1 100644 --- a/src/extractor/__snapshots__/DoodStream.test.ts.snap +++ b/src/extractor/__snapshots__/DoodStream.test.ts.snap @@ -8,12 +8,12 @@ exports[`DoodStream can guess height from title 1`] = ` "meta": { "bytes": 549139251, "countryCodes": [], + "extractorId": "doodstream", "title": "Black Mirror S04E02 FRENCH 720p WEB x264-RiPiT", }, "requestHeaders": { "Referer": "http://dood.to", }, - "sourceId": "doodstream_", "ttl": 21600000, "url": "https://ee317r.cloudatacdn.com/u5kj63yvxddlsdgge7qremqqka27irwiupc4k7o5cikbhjliz6xwv2xr53uq/lco4d3heif~mocked-random-string?token=fh3rdlhjvao7chgxndsi3ra7&expiry=639837296000", }, @@ -27,12 +27,12 @@ exports[`DoodStream cloudflare storage 1`] = ` "label": "DoodStream", "meta": { "countryCodes": [], + "extractorId": "doodstream", "title": "241653--5bf448d3-184a-4b3f-a766-fa98d93c1300--bllz--2100527-doodstream", }, "requestHeaders": { "Referer": "http://dood.to", }, - "sourceId": "doodstream_", "ttl": 21600000, "url": "https://wec6bnh7rx7rw11bv9e9vslw4rud8nam.5f1ebd98099ce35faeeddb30c1752191.r2.cloudflarestorage.com/icxxqqdsfdc4?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=ab085b515b950aae0a86cae59456cacd%2F20250714%2Fauto%2Fs3%2Faws4_request&X-Amz-Date=20250714T154400Z&X-Amz-Expires=3600&X-Amz-SignedHeaders=host&X-Amz-Signature=845ebfa5feedd840027e431f31e013513dd4c4f74364b4e75a2c8ddb213bd97a", }, @@ -47,12 +47,12 @@ exports[`DoodStream dood.to 1`] = ` "meta": { "bytes": 1395864371, "countryCodes": [], + "extractorId": "doodstream", "title": "des-teufels-bad-2024", }, "requestHeaders": { "Referer": "http://dood.to", }, - "sourceId": "doodstream_", "ttl": 21600000, "url": "https://aa360cc.cloudatacdn.com/u5kjv4jxytd3sdgge5uogji5dg4huat2pxrm2qibdbm5rlyusvl46iz3u3ta/1f4isxg0tw~mocked-random-string?token=7uebebipnnhusa4xnyea1er4&expiry=639837296000", }, diff --git a/src/extractor/__snapshots__/Dropload.test.ts.snap b/src/extractor/__snapshots__/Dropload.test.ts.snap index 22821e4..3efb4e1 100644 --- a/src/extractor/__snapshots__/Dropload.test.ts.snap +++ b/src/extractor/__snapshots__/Dropload.test.ts.snap @@ -8,10 +8,10 @@ exports[`Dropload download URL 1`] = ` "meta": { "bytes": 333027737, "countryCodes": [], + "extractorId": "dropload", "height": 720, "title": "[~Squid~Game~EnG~]~S03E01~720p~WebRip ~❤️GLD❤️~", }, - "sourceId": "dropload_", "ttl": 10800000, "url": "https://srv29.dropload.io/hls2/01/00305/xhcmgcc2txnv_h/master.m3u8?t=MBKiIoVlA42YcZEixT7ZR1xJA5qKhcKgBi84GPmyT7U&s=1752613129&e=14400&f=1526758&i=0.0&sp=0&ii=130.61.236.204", }, @@ -25,10 +25,10 @@ exports[`Dropload dropload unknown height and size 1`] = ` "label": "Dropload", "meta": { "countryCodes": [], + "extractorId": "dropload", "height": 800, "title": "The Lost Bus 2025 1080p WEBRip x265", }, - "sourceId": "dropload_", "ttl": 10800000, "url": "https://ds16.dropcdn.io/hls2/02/00314/gf2apij3ql37_h/master.m3u8?t=jq0VCV2dOyLIIH07IGIpzruCXvbfdVqzGLWfMeo00AM&s=1759845990&e=14400&f=1571895&srv=ds3&i=0.0&sp=0&ii=2.184.0.222&p1=ds3&p2=ds3", }, @@ -43,10 +43,10 @@ exports[`Dropload dropload.io 1`] = ` "meta": { "bytes": 1395864371, "countryCodes": [], + "extractorId": "dropload", "height": 1080, "title": "des-teufels-bad-2024", }, - "sourceId": "dropload_", "ttl": 10800000, "url": "https://srv34.dropload.io/hls2/01/00197/lyo2h1snpe5c_h/master.m3u8?t=ESjD9Le53ttKN2JPyxrhLUqTebDZvx3vcQUlNgP6Vko&s=1749845553&e=14400&f=987607&srv=srv27&i=0.0&sp=0&ii=50.99.15.93&p1=srv27&p2=srv27", }, diff --git a/src/extractor/__snapshots__/ExternalUrl.test.ts.snap b/src/extractor/__snapshots__/ExternalUrl.test.ts.snap index 02ba3e7..32134a9 100644 --- a/src/extractor/__snapshots__/ExternalUrl.test.ts.snap +++ b/src/extractor/__snapshots__/ExternalUrl.test.ts.snap @@ -8,8 +8,8 @@ exports[`ExternalUrl 404 - not found 1`] = ` "label": "streamtape.com", "meta": { "countryCodes": [], + "extractorId": "external", }, - "sourceId": "external_", "ttl": 21600000, "url": "https://streamtape.com/e/gjA1OQ4klyHxgJ", }, @@ -24,8 +24,8 @@ exports[`ExternalUrl netu.fanstream.us 1`] = ` "label": "netu.fanstream.us", "meta": { "countryCodes": [], + "extractorId": "external", }, - "sourceId": "external_", "ttl": 21600000, "url": "https://netu.fanstream.us/e/0DFgfkcXOsDP", }, diff --git a/src/extractor/__snapshots__/ExtractorRegistry.test.ts.snap b/src/extractor/__snapshots__/ExtractorRegistry.test.ts.snap index d315b86..a5115eb 100644 --- a/src/extractor/__snapshots__/ExtractorRegistry.test.ts.snap +++ b/src/extractor/__snapshots__/ExtractorRegistry.test.ts.snap @@ -10,8 +10,8 @@ exports[`ExtractorRegistry returns external URLs if enabled by config 1`] = ` "label": "mixdrop.ag", "meta": { "countryCodes": [], + "extractorId": "external", }, - "sourceId": "external_", "ttl": 21600000, "url": "https://mixdrop.ag/e/3nzwveprim63or6", }, @@ -28,8 +28,8 @@ exports[`ExtractorRegistry returns external url for error 1`] = ` "label": "Dropload", "meta": { "countryCodes": [], + "extractorId": "dropload", }, - "sourceId": "dropload", "url": "https://dropload.io/mocked-blocked.html", }, ] diff --git a/src/extractor/__snapshots__/Fastream.test.ts.snap b/src/extractor/__snapshots__/Fastream.test.ts.snap index efbc22b..d3d2450 100644 --- a/src/extractor/__snapshots__/Fastream.test.ts.snap +++ b/src/extractor/__snapshots__/Fastream.test.ts.snap @@ -10,10 +10,10 @@ exports[`Fastream fastream.to embed 1`] = ` "meta": { "bytes": 1073741824, "countryCodes": [], + "extractorId": "fastream", "height": 1080, "title": "black.mirror.s01e01.lat.720p.mp4", }, - "sourceId": "fastream_", "ttl": 900000, "url": "https://mediaflow-proxy.test/proxy/hls/manifest.m3u8?api_password=asdfg&h_user-agent=Mozilla%2F5.0+%28X11%3B+Linux+x86_64%3B+rv%3A138.0%29+Gecko%2F20100101+Firefox%2F138.0&h_Accept=*%2F*&h_Connection=keep-alive&h_Accept-Language=en-US%2Cen%3Bq%3D0.5&h_referer=https%3A%2F%2Ffastream.to%2F&h_origin=https%3A%2F%2Ffastream.to&d=https%3A%2F%2Fs28.fastream.to%2Fhls2%2F09%2F00024%2F3aooif4ozt10_%2Cl%2Cn%2Ch%2Cx%2C.urlset%2Fmaster.m3u8%3Ft%3Dnw6_aeN6pDROuXsJQwyrJVm3qHKFedVfbTNj5LgXH-4%26s%3D1752863379%26e%3D43200%26v%3D1058373%26i%3D0.3%26sp%3D0", }, diff --git a/src/extractor/__snapshots__/FileLions.test.ts.snap b/src/extractor/__snapshots__/FileLions.test.ts.snap index 078554e..56fa1d7 100644 --- a/src/extractor/__snapshots__/FileLions.test.ts.snap +++ b/src/extractor/__snapshots__/FileLions.test.ts.snap @@ -10,10 +10,10 @@ exports[`FileLions filelions f 1`] = ` "meta": { "bytes": 481191526, "countryCodes": [], + "extractorId": "filelions", "height": 720, "title": "dexter resurrection s01e01 1080p web h264-successfulcrab", }, - "sourceId": "filelions_", "ttl": 900000, "url": "https://mediaflow.test.org/proxy/hls/manifest.m3u8?api_password=test&h_user-agent=Mozilla%2F5.0+%28Windows+NT+10.0%3B+Win64%3B+x64%29+AppleWebKit%2F537.36+%28KHTML%2C+like+Gecko%29+Chrome%2F136.0.0.0+Safari%2F537.36&h_referer=https%3A%2F%2Ffilelions.to%2Fv%2Ftyn45apubte2&d=https%3A%2F%2FRNzT2t4XVKU08.acek-cdn.com%2Fhls2%2F01%2F05594%2Ftyn45apubte2_n%2Fmaster.m3u8%3Ft%3D8y6hK40boUynXnkyW5s63kFaWpt6_A5UcG5LBUX3j_4%26s%3D1756131487%26e%3D129600%26f%3D27974684%26srv%3DF6vE2P5Wjncn%26i%3D0.4%26sp%3D500%26p1%3DF6vE2P5Wjncn%26p2%3DF6vE2P5Wjncn%26asn%3D31898", }, @@ -28,11 +28,11 @@ exports[`FileLions mivalyo v referer lock 1`] = ` "meta": { "bytes": 2097152, "countryCodes": [], + "extractorId": "filelions", "height": 1080, "referer": "https://kinoger.com", "title": "Versailles S01E01 German AC3 DL 1080p BDRip x265-FuN", }, - "sourceId": "filelions_", "ttl": 900000, "url": "https://mediaflow.test.org/proxy/hls/manifest.m3u8?api_password=test&h_user-agent=Mozilla%2F5.0+%28Windows+NT+10.0%3B+Win64%3B+x64%29+AppleWebKit%2F537.36+%28KHTML%2C+like+Gecko%29+Chrome%2F136.0.0.0+Safari%2F537.36&h_referer=https%3A%2F%2Fkinoger.com&d=https%3A%2F%2F6dkDxt1udLQhbho.ovaltinecdn.com%2Fhls2%2F01%2F01552%2Ftah5znapz3e5_n%2Fmaster.m3u8%3Ft%3DMnSHt6lZx3bdKvTdoU1JsTLWp56dlRDLwze5Prnefew%26s%3D1756131487%26e%3D129600%26f%3D7760835%26srv%3DGOweneve6B0I%26i%3D0.4%26sp%3D500%26p1%3DGOweneve6B0I%26p2%3DGOweneve6B0I%26asn%3D31898", }, diff --git a/src/extractor/__snapshots__/FileMoon.test.ts.snap b/src/extractor/__snapshots__/FileMoon.test.ts.snap index 0c84459..56c2fc3 100644 --- a/src/extractor/__snapshots__/FileMoon.test.ts.snap +++ b/src/extractor/__snapshots__/FileMoon.test.ts.snap @@ -9,10 +9,10 @@ exports[`FileMoon z1ekv717 d 1`] = ` "label": "FileMoon (MFP)", "meta": { "countryCodes": [], + "extractorId": "filemoon", "height": 720, "title": "alien earth s01e01 1080p web h264-successfulcrab", }, - "sourceId": "filemoon_", "ttl": 900000, "url": "https://mediaflow.test.org/proxy/hls/manifest.m3u8?api_password=test&h_user-agent=Mozilla%2F5.0+%28Windows+NT+10.0%3B+Win64%3B+x64%29+AppleWebKit%2F537.36+%28KHTML%2C+like+Gecko%29+Chrome%2F136.0.0.0+Safari%2F537.36&h_referer=https%3A%2F%2Fz1ekv717.fun%2Fd%2Fwkhcbggdxf1d&d=https%3A%2F%2Fbe7713.rcr82.waw05.i8yz83pn.com%2Fhls2%2F01%2F09665%2Fwkhcbggdxf1d_h%2Fmaster.m3u8%3Ft%3D359izbQ_L-sOHaIjj275YKdBDyiPzUi3ETfbNoN9bzU%26s%3D1759754698%26e%3D10800%26f%3D48329866%26srv%3D1075%26asn%3D13335%26sp%3D4000%26p%3D", }, diff --git a/src/extractor/__snapshots__/HubCloud.test.ts.snap b/src/extractor/__snapshots__/HubCloud.test.ts.snap index 98f2c15..42f8713 100644 --- a/src/extractor/__snapshots__/HubCloud.test.ts.snap +++ b/src/extractor/__snapshots__/HubCloud.test.ts.snap @@ -8,6 +8,7 @@ exports[`HubCloud handle crayon shin-chan 1993 1`] = ` "meta": { "bytes": 28550795100, "countryCodes": [], + "extractorId": "hubcloud", "title": "Crayon Shinchan Action Kamen vs Demon (1993) 1080p BluRay REMUX AVC [Hindi DD 2.0 + Japanese FLAC 2.0] (PitiPati-Ionicboy) (4kHDHub.com).mkv", }, "sourceId": "hubcloud_fsl", @@ -25,6 +26,7 @@ exports[`HubCloud handle dark 2017 s03e08 1`] = ` "meta": { "bytes": 3382286745, "countryCodes": [], + "extractorId": "hubcloud", "title": "Dark.S03E08.The.Paradise.1080p.NF.WEB-DL.English.DDP5.1-German.DDP5.1.H.264-4kHdHub.Com.mkv", }, "sourceId": "hubcloud_fsl", @@ -37,6 +39,7 @@ exports[`HubCloud handle dark 2017 s03e08 1`] = ` "meta": { "bytes": 3382286745, "countryCodes": [], + "extractorId": "hubcloud", "title": "Dark.S03E08.The.Paradise.1080p.NF.WEB-DL.English.DDP5.1-German.DDP5.1.H.264-4kHdHub.Com.mkv", }, "sourceId": "hubcloud_pixelserver", @@ -54,6 +57,7 @@ exports[`HubCloud handle dexter original sin 2024 s01e01 1`] = ` "meta": { "bytes": 5733781340, "countryCodes": [], + "extractorId": "hubcloud", "title": "Dexter.Original.Sin.S01E01.2160p.SKST.WEB-DL.H.265.DDP5.1-Tyrell.mkv", }, "sourceId": "hubcloud_fsl", @@ -66,6 +70,7 @@ exports[`HubCloud handle dexter original sin 2024 s01e01 1`] = ` "meta": { "bytes": 5733781340, "countryCodes": [], + "extractorId": "hubcloud", "title": "Dexter.Original.Sin.S01E01.2160p.SKST.WEB-DL.H.265.DDP5.1-Tyrell.mkv", }, "sourceId": "hubcloud_pixelserver", diff --git a/src/extractor/__snapshots__/KinoGer.test.ts.snap b/src/extractor/__snapshots__/KinoGer.test.ts.snap index c68cbb3..2a89e1c 100644 --- a/src/extractor/__snapshots__/KinoGer.test.ts.snap +++ b/src/extractor/__snapshots__/KinoGer.test.ts.snap @@ -7,13 +7,13 @@ exports[`KinoGer Blood & Sinners 1`] = ` "label": "KinoGer", "meta": { "countryCodes": [], + "extractorId": "kinoger", "height": 1080, "title": "Blood.and.Sinners.2025.mkv", }, "requestHeaders": { "Referer": "https://kinoger.re", }, - "sourceId": "kinoger_", "ttl": 21600000, "url": "https://scvo.processorprediction.shop/v4/bgm/ge5fhb/cf-master.txt?v=1748766126", }, @@ -27,13 +27,13 @@ exports[`KinoGer Dead City 1`] = ` "label": "KinoGer", "meta": { "countryCodes": [], + "extractorId": "kinoger", "height": 1080, "title": "the.walking.dead.dead.city.s02e05.german.dl.1080p.web.x264-wvf.mkv", }, "requestHeaders": { "Referer": "https://kinoger.re", }, - "sourceId": "kinoger_", "ttl": 21600000, "url": "https://sipt.responseautomation.cyou/v4/vz1/x6tsx9/cf-master.txt?v=1748957184", }, @@ -47,13 +47,13 @@ exports[`KinoGer filma365.strp2p.site 1`] = ` "label": "KinoGer", "meta": { "countryCodes": [], + "extractorId": "kinoger", "height": 640, "title": "Our.Fault.2025.mp4", }, "requestHeaders": { "Referer": "https://filma365.strp2p.site", }, - "sourceId": "kinoger_", "ttl": 21600000, "url": "https://slp.seawindart.space/v4/s93/vih6bx/cf-master.txt?v=1760732665", }, diff --git a/src/extractor/__snapshots__/LuluStream.test.ts.snap b/src/extractor/__snapshots__/LuluStream.test.ts.snap index c8665aa..8c1bdfb 100644 --- a/src/extractor/__snapshots__/LuluStream.test.ts.snap +++ b/src/extractor/__snapshots__/LuluStream.test.ts.snap @@ -10,10 +10,10 @@ exports[`LuluStream streamhihi 1`] = ` "meta": { "bytes": 1288490188, "countryCodes": [], + "extractorId": "lulustream", "height": 720, "title": "The Thursday Murder Club 2025 1080p NF WEB-DL DDP5 1 Atmos H 264-playWEB", }, - "sourceId": "lulustream_", "ttl": 900000, "url": "https://mediaflow.test.org/proxy/hls/manifest.m3u8?api_password=test&h_user-agent=Mozilla%2F5.0+%28Windows+NT+10.0%3B+Win64%3B+x64%29+AppleWebKit%2F537.36+%28KHTML%2C+like+Gecko%29+Chrome%2F136.0.0.0+Safari%2F537.36&h_referer=https%3A%2F%2Fstreamhihi.com%2Fe%2Fmk9m58lz8ts6&d=https%3A%2F%2Fh1gdnnp1dr11.tnmr.org%2Fhls2%2F02%2F02416%2Fqx1ysro2ny1o_h%2Fmaster.m3u8%3Ft%3DC1RS64a-9j6bSDO9TmHU9jIZpVb59jsWah7j-KgJkRg%26s%3D1759753708%26e%3D28800%26f%3D12081096%26i%3D0.3%26sp%3D0", }, @@ -28,10 +28,10 @@ exports[`LuluStream streamhihi d 1`] = ` "meta": { "bytes": 1288490188, "countryCodes": [], + "extractorId": "lulustream", "height": 720, "title": "The Thursday Murder Club 2025 1080p NF WEB-DL DDP5 1 Atmos H 264-playWEB", }, - "sourceId": "lulustream_", "ttl": 900000, "url": "https://mediaflow.test.org/proxy/hls/manifest.m3u8?api_password=test&h_user-agent=Mozilla%2F5.0+%28Windows+NT+10.0%3B+Win64%3B+x64%29+AppleWebKit%2F537.36+%28KHTML%2C+like+Gecko%29+Chrome%2F136.0.0.0+Safari%2F537.36&h_referer=https%3A%2F%2Fstreamhihi.com%2Fe%2Fmk9m58lz8ts6&d=https%3A%2F%2Fh1gdnnp1dr11.tnmr.org%2Fhls2%2F02%2F02416%2Fqx1ysro2ny1o_h%2Fmaster.m3u8%3Ft%3DC1RS64a-9j6bSDO9TmHU9jIZpVb59jsWah7j-KgJkRg%26s%3D1759753708%26e%3D28800%26f%3D12081096%26i%3D0.3%26sp%3D0", }, diff --git a/src/extractor/__snapshots__/Mixdrop.test.ts.snap b/src/extractor/__snapshots__/Mixdrop.test.ts.snap index d146a37..cf55c81 100644 --- a/src/extractor/__snapshots__/Mixdrop.test.ts.snap +++ b/src/extractor/__snapshots__/Mixdrop.test.ts.snap @@ -10,9 +10,9 @@ exports[`Mixdrop mixdrop.my /e/ 1`] = ` "meta": { "bytes": 1059806248, "countryCodes": [], + "extractorId": "mixdrop", "title": "28_giorni_dopo_2002_HD_-_Altadefinizione01.mp4", }, - "sourceId": "mixdrop_", "ttl": 900000, "url": "https://mediaflow-proxy.test/extractor/video?host=Mixdrop&api_password=asdfg&d=https%3A%2F%2Fmixdrop.my%2Fe%2Fknq0kj8waq44l8&redirect_stream=true", }, diff --git a/src/extractor/__snapshots__/SaveFiles.test.ts.snap b/src/extractor/__snapshots__/SaveFiles.test.ts.snap index 9046504..726fb21 100644 --- a/src/extractor/__snapshots__/SaveFiles.test.ts.snap +++ b/src/extractor/__snapshots__/SaveFiles.test.ts.snap @@ -7,10 +7,10 @@ exports[`SafeFiles savefiles /d/ 1`] = ` "label": "SaveFiles", "meta": { "countryCodes": [], + "extractorId": "savefiles", "height": 532, "title": "dexter resurrection s01e01 1080p web h264-successfulcrab", }, - "sourceId": "savefiles_", "ttl": 21600000, "url": "https://s3.savefiles.com/hls2/01/00133/,c51qm3p0rhtm_n,.urlset/master.m3u8?t=ptFA7PhoGXdNqH2jfu3EVKT4Fn5laaqfHBW1MMOa74o&s=1755775635&e=43200&v=199331&srv=s1&i=0.0&sp=0", }, @@ -24,10 +24,10 @@ exports[`SafeFiles savefiles /e/ 1`] = ` "label": "SaveFiles", "meta": { "countryCodes": [], + "extractorId": "savefiles", "height": 720, "title": "dexter resurrection s01e01 1080p web h264-successfulcrab", }, - "sourceId": "savefiles_", "ttl": 21600000, "url": "https://s3.savefiles.com/hls2/01/00133/,j4orffalv89e_n,.urlset/master.m3u8?t=uwZgBnJBJ-wfgWvDwmLamHkR-vuqzrBFuLH7QoAH-QE&s=1755775635&e=43200&v=199330&srv=s1&i=0.0&sp=0", }, @@ -41,10 +41,10 @@ exports[`SafeFiles savefiles 1`] = ` "label": "SaveFiles", "meta": { "countryCodes": [], + "extractorId": "savefiles", "height": 720, "title": "King Of The Hill S14E01 1080p HEVC x265-MeGusta", }, - "sourceId": "savefiles_", "ttl": 21600000, "url": "https://s3.savefiles.com/hls2/01/00153/,ip0k0dj2g0i3_n,lang/eng/ip0k0dj2g0i3_eng,.urlset/master.m3u8?t=Emm2ipTW9Db4fBNcQqc8qNju3Yysg0GjGoYiC0FB-G4&s=1755078897&e=43200&v=406428&srv=s1&i=0.0&sp=0&fr=ip0k0dj2g0i3", }, @@ -62,10 +62,10 @@ exports[`SafeFiles streamhls /e/ 1`] = ` "label": "SaveFiles", "meta": { "countryCodes": [], + "extractorId": "savefiles", "height": 720, "title": "King Of The Hill S14E01 1080p HEVC x265-MeGusta", }, - "sourceId": "savefiles_", "ttl": 21600000, "url": "https://s3.savefiles.com/hls2/01/00153/,ip0k0dj2g0i3_n,lang/eng/ip0k0dj2g0i3_eng,.urlset/master.m3u8?t=Emm2ipTW9Db4fBNcQqc8qNju3Yysg0GjGoYiC0FB-G4&s=1755078897&e=43200&v=406428&srv=s1&i=0.0&sp=0&fr=ip0k0dj2g0i3", }, diff --git a/src/extractor/__snapshots__/StreamEmbed.test.ts.snap b/src/extractor/__snapshots__/StreamEmbed.test.ts.snap index 27d1711..1ab9e11 100644 --- a/src/extractor/__snapshots__/StreamEmbed.test.ts.snap +++ b/src/extractor/__snapshots__/StreamEmbed.test.ts.snap @@ -9,10 +9,10 @@ exports[`StreamEmbed watch.gxplayer.xyz 1`] = ` "label": "StreamEmbed", "meta": { "countryCodes": [], + "extractorId": "streamembed", "height": 720, "title": "Baymax - Riesiges Robowabohu.mp4", }, - "sourceId": "streamembed_", "ttl": 900000, "url": "https://watch.gxplayer.xyz/m3u8/3/30b4a92517ace5825f5944c8a794ad3e/master.txt?s=1&id=11782&cache=1", }, diff --git a/src/extractor/__snapshots__/Streamtape.test.ts.snap b/src/extractor/__snapshots__/Streamtape.test.ts.snap index 094712a..c68c5e7 100644 --- a/src/extractor/__snapshots__/Streamtape.test.ts.snap +++ b/src/extractor/__snapshots__/Streamtape.test.ts.snap @@ -8,9 +8,9 @@ exports[`Streamtape streamtape.com /e 1`] = ` "meta": { "bytes": 1288490188, "countryCodes": [], + "extractorId": "streamtape", "title": "WALL-E.2008.1080p.BrRip.x264.YIFY.mp4", }, - "sourceId": "streamtape_", "ttl": 900000, "url": "https://mediaflow.test.org/extractor/video?host=Streamtape&api_password=test&d=https%3A%2F%2Fstreamtape.com%2Fv%2FDjmZBG0K9gHkJ7z%2FWALL-E.2008.1080p.BrRip.x264.YIFY.mp4&h_referer=https%3A%2F%2Fstreamtape.com%2Fv%2FDjmZBG0K9gHkJ7z%2FWALL-E.2008.1080p.BrRip.x264.YIFY.mp4&redirect_stream=true", }, diff --git a/src/extractor/__snapshots__/SuperVideo.test.ts.snap b/src/extractor/__snapshots__/SuperVideo.test.ts.snap index 6027b7f..1a7f018 100644 --- a/src/extractor/__snapshots__/SuperVideo.test.ts.snap +++ b/src/extractor/__snapshots__/SuperVideo.test.ts.snap @@ -9,10 +9,10 @@ exports[`SuperVideo embed only 1`] = ` "label": "SuperVideo", "meta": { "countryCodes": [], + "extractorId": "supervideo", "height": 1080, "title": "", }, - "sourceId": "supervideo_", "ttl": 10800000, "url": "https://hfs308.serversicuro.cc/hls/,dnzpe7rf5xg4a3gyva3h5orlyw23xosfzwunl5xbmjpz2l6t3doh5zbwynna,.urlset/master.m3u8", }, @@ -29,10 +29,10 @@ exports[`SuperVideo supervideo.cc /e/ 1`] = ` "meta": { "bytes": 1073741824, "countryCodes": [], + "extractorId": "supervideo", "height": 720, "title": "des-teufels-bad-2024", }, - "sourceId": "supervideo_", "ttl": 10800000, "url": "https://hfs309.serversicuro.cc/hls/,dnzpfi3d27g4a3gyvbmh5klwtl65qh654hyjtgupd6p577fze64cp3rsmdyq,.urlset/master.m3u8", }, @@ -47,10 +47,10 @@ exports[`SuperVideo supervideo.tv /embed-/ 1`] = ` "meta": { "bytes": 219571814, "countryCodes": [], + "extractorId": "supervideo", "height": 344, "title": "Babylon 5 2x3", }, - "sourceId": "supervideo_", "ttl": 10800000, "url": "https://hfs307.serversicuro.cc/hls/,dnzpaalv5xg4a3gyvavh52jryoft7o5cd5nm7cwtnu74kmc4ohiklh5qwq4q,.urlset/master.m3u8", }, diff --git a/src/extractor/__snapshots__/Uqload.test.ts.snap b/src/extractor/__snapshots__/Uqload.test.ts.snap index 9cdcf42..1484653 100644 --- a/src/extractor/__snapshots__/Uqload.test.ts.snap +++ b/src/extractor/__snapshots__/Uqload.test.ts.snap @@ -9,10 +9,10 @@ exports[`Uqload uqload.net /embed- 1`] = ` "label": "Uqload (MFP)", "meta": { "countryCodes": [], + "extractorId": "uqload", "height": 360, "title": "Black Mirror S07E06 MULTI VFF 1080p WEBrip EAC3 5 1 x265-TyHD", }, - "sourceId": "uqload_", "ttl": 900000, "url": "https://mediaflow.test.org/extractor/video?host=Uqload&api_password=test&d=https%3A%2F%2Fuqload.net%2Fz0xbr87oz637.html&redirect_stream=true", }, diff --git a/src/extractor/__snapshots__/Vidora.test.ts.snap b/src/extractor/__snapshots__/Vidora.test.ts.snap index e2b6d6b..f649bc1 100644 --- a/src/extractor/__snapshots__/Vidora.test.ts.snap +++ b/src/extractor/__snapshots__/Vidora.test.ts.snap @@ -7,13 +7,13 @@ exports[`Vidora vidora.stream /embed/ 1`] = ` "label": "Vidora", "meta": { "countryCodes": [], + "extractorId": "vidora", "height": 800, "title": "Highest Lowest 2025 1080p ATVP WEB DDP5 Atmos 264 BYNDR", }, "requestHeaders": { "Origin": "https://vidora.stream", }, - "sourceId": "vidora_", "ttl": 43200000, "url": "https://cdn.dmovies.top/hls2/03/00000/5iz6c1elaqgq_,h,x,.urlset/master.m3u8?t=59WQnICkdOsWf2RrsiNPQmXTU1CUk7gGqBgLvh-MaIU&s=1761923136&e=43200&v=22226828&srv=maxcdn&i=0.3&sp=5000&fr=5iz6c1elaqgq", }, @@ -27,13 +27,13 @@ exports[`Vidora vidora.stream 1`] = ` "label": "Vidora", "meta": { "countryCodes": [], + "extractorId": "vidora", "height": 800, "title": "Highest Lowest 2025 1080p ATVP WEB DDP5 Atmos 264 BYNDR", }, "requestHeaders": { "Origin": "https://vidora.stream", }, - "sourceId": "vidora_", "ttl": 43200000, "url": "https://cdn.dmovies.top/hls2/03/00000/5iz6c1elaqgq_,h,x,.urlset/master.m3u8?t=59WQnICkdOsWf2RrsiNPQmXTU1CUk7gGqBgLvh-MaIU&s=1761923136&e=43200&v=22226828&srv=maxcdn&i=0.3&sp=5000&fr=5iz6c1elaqgq", }, diff --git a/src/extractor/__snapshots__/VixSrc.test.ts.snap b/src/extractor/__snapshots__/VixSrc.test.ts.snap index dfe02a7..6b4f3c1 100644 --- a/src/extractor/__snapshots__/VixSrc.test.ts.snap +++ b/src/extractor/__snapshots__/VixSrc.test.ts.snap @@ -10,9 +10,9 @@ exports[`VixSrc Black Mirror 1`] = ` "it", "en", ], + "extractorId": "vixsrc", "height": 1080, }, - "sourceId": "vixsrc_", "ttl": 21600000, "url": "https://vixsrc.to/playlist/307316.m3u8?token=5e3c2b315b1eee966c5261902e02d3b4&expires=1764445261&h=1", }, @@ -31,9 +31,9 @@ exports[`VixSrc Full Metal Jacket 1`] = ` "it", "en", ], + "extractorId": "vixsrc", "height": 1080, }, - "sourceId": "vixsrc_", "ttl": 21600000, "url": "https://vixsrc.to/playlist/219736.m3u8?token=436a7a6bc6256b32eece595e2d7c5ed6&expires=1764445261&h=1", }, diff --git a/src/extractor/__snapshots__/Voe.test.ts.snap b/src/extractor/__snapshots__/Voe.test.ts.snap index 891114b..b8f84d5 100644 --- a/src/extractor/__snapshots__/Voe.test.ts.snap +++ b/src/extractor/__snapshots__/Voe.test.ts.snap @@ -7,10 +7,10 @@ exports[`Voe embed only urls which otherwise lead to 404 1`] = ` "label": "VOE (MFP)", "meta": { "countryCodes": [], + "extractorId": "voe", "height": 800, "title": "Weapons.2025.German.DL.1080p.WEB.H264-ZeroTwo_encoded.mp4", }, - "sourceId": "voe_", "ttl": 900000, "url": "https://mediaflow.test.org/proxy/hls/manifest.m3u8?api_password=test&h_user-agent=Mozilla%2F5.0+%28Windows+NT+10.0%3B+Win64%3B+x64%29+AppleWebKit%2F537.36+%28KHTML%2C+like+Gecko%29+Chrome%2F136.0.0.0+Safari%2F537.36&h_referer=https%3A%2F%2Fjilliandescribecompany.com%2Fqqfyi04w52mj&d=https%3A%2F%2Fcdn-thhhlmzuxvpehc9r.orbitcache.com%2Fengine%2Fhls2-c%2F01%2F11526%2Fqqfyi04w52mj_%2Cl%2C.urlset%2Fmaster.m3u8%3Ft%3Dg2zuS_OAHTtjrVe0bHp2xYcX7PpDxg8ebRIHTmF3H1c%26s%3D1759861731%26e%3D14400%26f%3D57634053%26node%3DUOx5276IumOH4BADikx4rlHC%2BibdAWZ%2Bmo07sx3WfaU%3D%26i%3D104.28%26sp%3D2500%26asn%3D13335%26q%3Dl%26rq%3DFxkyWdISXylA0UaLSPNcXWkDrksjs0pkAzy0GvIS", }, @@ -27,10 +27,10 @@ exports[`Voe jilliandescribecompany 1`] = ` "meta": { "bytes": 1202590842, "countryCodes": [], + "extractorId": "voe", "height": 720, "title": "Superman.2025.2160p.WEB-DL.DV.HDR10Plus.X265.DDP5.1.Atmos-YIN.mp4", }, - "sourceId": "voe_", "ttl": 900000, "url": "https://mediaflow.test.org/proxy/hls/manifest.m3u8?api_password=test&h_user-agent=Mozilla%2F5.0+%28Windows+NT+10.0%3B+Win64%3B+x64%29+AppleWebKit%2F537.36+%28KHTML%2C+like+Gecko%29+Chrome%2F136.0.0.0+Safari%2F537.36&h_referer=https%3A%2F%2Fjilliandescribecompany.com%2Fe%2Fea21l02gcygw&d=https%3A%2F%2Fcdn-kuc3ehpz4wnczfyz.orbitcache.com%2Fengine%2Fhls2-c%2F01%2F15242%2Fea21l02gcygw_%2Cn%2C.urlset%2Fmaster.m3u8%3Ft%3D3iMAKoJqij6nC4HDamYxtDB75a_-AlG_wD1demRBo0I%26s%3D1759754183%26e%3D14400%26f%3D76213694%26node%3DFPYruvgfgORaUYuYfpByMgjFbC8X%2FHWKW1utbUQQRyQ%3D%26i%3D104.28%26sp%3D2500%26asn%3D13335%26q%3Dn%26rq%3DzKNpONzQJHzTeXTzr0V2M9V4DUnzwX9C8hTNxrUW", }, @@ -45,10 +45,10 @@ exports[`Voe premium only without resolution 1`] = ` "meta": { "bytes": 363216240, "countryCodes": [], + "extractorId": "voe", "height": 800, "title": "268836--21ba9fb2-97f9-4566-b5eb-3d9cef7674cf--zrxn--2352322-voesx.mp4", }, - "sourceId": "voe_", "ttl": 900000, "url": "https://mediaflow.test.org/proxy/hls/manifest.m3u8?api_password=test&h_user-agent=Mozilla%2F5.0+%28Windows+NT+10.0%3B+Win64%3B+x64%29+AppleWebKit%2F537.36+%28KHTML%2C+like+Gecko%29+Chrome%2F136.0.0.0+Safari%2F537.36&h_referer=https%3A%2F%2Fjilliandescribecompany.com%2Fqqfyi04w52mj&d=https%3A%2F%2Fcdn-thhhlmzuxvpehc9r.orbitcache.com%2Fengine%2Fhls2-c%2F01%2F11526%2Fqqfyi04w52mj_%2Cl%2C.urlset%2Fmaster.m3u8%3Ft%3Dg2zuS_OAHTtjrVe0bHp2xYcX7PpDxg8ebRIHTmF3H1c%26s%3D1759861731%26e%3D14400%26f%3D57634053%26node%3DUOx5276IumOH4BADikx4rlHC%2BibdAWZ%2Bmo07sx3WfaU%3D%26i%3D104.28%26sp%3D2500%26asn%3D13335%26q%3Dl%26rq%3DFxkyWdISXylA0UaLSPNcXWkDrksjs0pkAzy0GvIS", }, diff --git a/src/extractor/__snapshots__/YouTube.test.ts.snap b/src/extractor/__snapshots__/YouTube.test.ts.snap index 88ff8bf..372ea0e 100644 --- a/src/extractor/__snapshots__/YouTube.test.ts.snap +++ b/src/extractor/__snapshots__/YouTube.test.ts.snap @@ -7,9 +7,9 @@ exports[`YouTube Solaris 1`] = ` "label": "YouTube", "meta": { "countryCodes": [], + "extractorId": "youtube", "title": "Solaris | SCIENCE FICTION | FULL MOVIE | directed by Tarkovsky", }, - "sourceId": "youtube_", "ttl": 21600000, "url": "https://www.youtube.com/watch?v=Z8ZhQPaw4rE", "ytId": "Z8ZhQPaw4rE", diff --git a/src/types.ts b/src/types.ts index c32e857..dd61ba7 100644 --- a/src/types.ts +++ b/src/types.ts @@ -74,6 +74,8 @@ export interface Meta { referer?: string | undefined; title?: string | undefined; sourceLabel?: string | undefined; + sourceId?: string | undefined; + extractorId?: string | undefined; } export enum Format { @@ -89,7 +91,6 @@ export interface UrlResult { ytId?: string; error?: unknown; label: string; - sourceId: string; ttl?: number; meta?: Meta; notWebReady?: boolean; diff --git a/src/utils/StreamResolver.test.ts b/src/utils/StreamResolver.test.ts index 5043925..974e2fc 100644 --- a/src/utils/StreamResolver.test.ts +++ b/src/utils/StreamResolver.test.ts @@ -102,7 +102,6 @@ describe('resolve', () => { isExternal: true, error: new BlockedError(new URL('https://example.com'), BlockedReason.cloudflare_challenge, {}), label: 'hoster.com', - sourceId: '', meta: { countryCodes: [CountryCode.de], }, @@ -113,7 +112,6 @@ describe('resolve', () => { isExternal: true, error: new BlockedError(new URL('https://example.com'), BlockedReason.cloudflare_censor, {}), label: 'hoster.com', - sourceId: '', meta: { countryCodes: [CountryCode.de], }, @@ -124,7 +122,6 @@ describe('resolve', () => { isExternal: true, error: new BlockedError(new URL('https://example.com'), BlockedReason.media_flow_proxy_auth, {}), label: 'hoster.com', - sourceId: '', meta: { countryCodes: [CountryCode.de], }, @@ -135,7 +132,6 @@ describe('resolve', () => { isExternal: true, error: new BlockedError(new URL('https://example.com'), BlockedReason.unknown, {}), label: 'hoster.com', - sourceId: '', meta: { countryCodes: [CountryCode.de], }, @@ -144,7 +140,6 @@ describe('resolve', () => { url: new URL('https://working2.com'), format: Format.unknown, label: 'working1', - sourceId: 'hostercom', meta: { countryCodes: [CountryCode.de], }, @@ -155,7 +150,6 @@ describe('resolve', () => { isExternal: true, error: new TooManyRequestsError(new URL('https://example.com'), 10), label: 'hoster.com', - sourceId: '', meta: { countryCodes: [CountryCode.de], }, @@ -166,7 +160,6 @@ describe('resolve', () => { isExternal: true, error: new TooManyTimeoutsError(new URL('https://example.com')), label: 'hoster.com', - sourceId: '', meta: { countryCodes: [CountryCode.de], }, @@ -175,7 +168,6 @@ describe('resolve', () => { url: new URL('https://working1.com'), format: Format.unknown, label: 'working2', - sourceId: 'hostercom', meta: { countryCodes: [CountryCode.de], }, @@ -186,7 +178,6 @@ describe('resolve', () => { isExternal: true, error: new TypeError(), label: 'hoster.com', - sourceId: '', meta: { countryCodes: [CountryCode.de], }, @@ -197,7 +188,6 @@ describe('resolve', () => { isExternal: true, error: new TimeoutError(new URL('https://example2.com')), label: 'hoster.com', - sourceId: '', meta: { countryCodes: [CountryCode.de], }, @@ -208,7 +198,6 @@ describe('resolve', () => { isExternal: true, error: new QueueIsFullError(new URL('https://example3.com')), label: 'hoster.com', - sourceId: '', meta: { countryCodes: [CountryCode.de], }, @@ -219,7 +208,6 @@ describe('resolve', () => { isExternal: true, error: new HttpError(new URL('https://example4.com'), 500, 'Internal Server Error', { 'x-foo': 'bar' }), label: 'hoster.com', - sourceId: '', meta: { countryCodes: [CountryCode.de], }, @@ -230,7 +218,6 @@ describe('resolve', () => { isExternal: true, error: new HttpError(new URL('https://example5.com'), 418, 'I\'m a tea pot', { 'x-foo': 'bar' }), label: 'hoster.com', - sourceId: '', meta: { countryCodes: [CountryCode.de], }, diff --git a/src/utils/StreamResolver.ts b/src/utils/StreamResolver.ts index 12ef397..83a01e9 100644 --- a/src/utils/StreamResolver.ts +++ b/src/utils/StreamResolver.ts @@ -50,7 +50,7 @@ export class StreamResolver { const sourceResults = await source.handle(ctx, type, id); const sourceUrlResults = await Promise.all( - sourceResults.map(({ url, meta }) => this.extractorRegistry.handle(ctx, url, { ...meta, sourceLabel: source.label })), + sourceResults.map(({ url, meta }) => this.extractorRegistry.handle(ctx, url, { ...meta, sourceLabel: source.label, sourceId: source.id })), ); urlResults.push(...sourceUrlResults.flat()); @@ -100,7 +100,7 @@ export class StreamResolver { name: this.buildName(ctx, urlResult), title: this.buildTitle(ctx, urlResult), behaviorHints: { - ...(urlResult.sourceId && { bingeGroup: `webstreamr-${urlResult.sourceId}` }), + bingeGroup: `webstreamr-${urlResult.meta?.sourceId}-${urlResult.meta?.extractorId}-${urlResult.meta?.countryCodes?.join('_')}`, ...((urlResult.format !== Format.mp4 || urlResult.url.protocol !== 'https:') && { notWebReady: true }), ...(urlResult.requestHeaders !== undefined && { notWebReady: true, @@ -182,7 +182,7 @@ export class StreamResolver { titleLines.push(titleDetailsLine.join(' ')); if (urlResult.error) { - titleLines.push(logErrorAndReturnNiceString(ctx, this.logger, urlResult.sourceId, urlResult.error)); + titleLines.push(logErrorAndReturnNiceString(ctx, this.logger, urlResult.meta?.sourceId ?? '', urlResult.error)); } return titleLines.join('\n'); diff --git a/src/utils/__snapshots__/StreamResolver.test.ts.snap b/src/utils/__snapshots__/StreamResolver.test.ts.snap index d87600d..57f4bc5 100644 --- a/src/utils/__snapshots__/StreamResolver.test.ts.snap +++ b/src/utils/__snapshots__/StreamResolver.test.ts.snap @@ -5,7 +5,7 @@ exports[`resolve adds error info 1`] = ` "streams": [ { "behaviorHints": { - "bingeGroup": "webstreamr-hostercom", + "bingeGroup": "webstreamr-undefined-undefined-de", "notWebReady": true, }, "name": "WebStreamr 🇩🇪", @@ -14,7 +14,7 @@ exports[`resolve adds error info 1`] = ` }, { "behaviorHints": { - "bingeGroup": "webstreamr-hostercom", + "bingeGroup": "webstreamr-undefined-undefined-de", "notWebReady": true, }, "name": "WebStreamr 🇩🇪", @@ -30,6 +30,7 @@ exports[`resolve adds error info 2`] = ` "streams": [ { "behaviorHints": { + "bingeGroup": "webstreamr-undefined-undefined-de", "notWebReady": true, }, "externalUrl": "https://example5.com/", @@ -39,6 +40,7 @@ exports[`resolve adds error info 2`] = ` }, { "behaviorHints": { + "bingeGroup": "webstreamr-undefined-undefined-de", "notWebReady": true, }, "externalUrl": "https://example4.com/", @@ -48,6 +50,7 @@ exports[`resolve adds error info 2`] = ` }, { "behaviorHints": { + "bingeGroup": "webstreamr-undefined-undefined-de", "notWebReady": true, }, "externalUrl": "https://example3.com/", @@ -57,6 +60,7 @@ exports[`resolve adds error info 2`] = ` }, { "behaviorHints": { + "bingeGroup": "webstreamr-undefined-undefined-de", "notWebReady": true, }, "externalUrl": "https://example2.com/", @@ -66,6 +70,7 @@ exports[`resolve adds error info 2`] = ` }, { "behaviorHints": { + "bingeGroup": "webstreamr-undefined-undefined-de", "notWebReady": true, }, "externalUrl": "https://example2.com/", @@ -75,6 +80,7 @@ exports[`resolve adds error info 2`] = ` }, { "behaviorHints": { + "bingeGroup": "webstreamr-undefined-undefined-de", "notWebReady": true, }, "externalUrl": "https://example.com/", @@ -84,6 +90,7 @@ exports[`resolve adds error info 2`] = ` }, { "behaviorHints": { + "bingeGroup": "webstreamr-undefined-undefined-de", "notWebReady": true, }, "externalUrl": "https://example.com/", @@ -93,6 +100,7 @@ exports[`resolve adds error info 2`] = ` }, { "behaviorHints": { + "bingeGroup": "webstreamr-undefined-undefined-de", "notWebReady": true, }, "externalUrl": "https://example.com/", @@ -102,6 +110,7 @@ exports[`resolve adds error info 2`] = ` }, { "behaviorHints": { + "bingeGroup": "webstreamr-undefined-undefined-de", "notWebReady": true, }, "externalUrl": "https://example.com/", @@ -111,6 +120,7 @@ exports[`resolve adds error info 2`] = ` }, { "behaviorHints": { + "bingeGroup": "webstreamr-undefined-undefined-de", "notWebReady": true, }, "externalUrl": "https://example.com/", @@ -120,6 +130,7 @@ exports[`resolve adds error info 2`] = ` }, { "behaviorHints": { + "bingeGroup": "webstreamr-undefined-undefined-de", "notWebReady": true, }, "externalUrl": "https://example.com/", @@ -129,7 +140,7 @@ exports[`resolve adds error info 2`] = ` }, { "behaviorHints": { - "bingeGroup": "webstreamr-hostercom", + "bingeGroup": "webstreamr-undefined-undefined-de", "notWebReady": true, }, "name": "WebStreamr 🇩🇪", @@ -138,7 +149,7 @@ exports[`resolve adds error info 2`] = ` }, { "behaviorHints": { - "bingeGroup": "webstreamr-hostercom", + "bingeGroup": "webstreamr-undefined-undefined-de", "notWebReady": true, }, "name": "WebStreamr 🇩🇪", @@ -186,7 +197,7 @@ exports[`resolve returns sorted results 1`] = ` [ { "behaviorHints": { - "bingeGroup": "webstreamr-dropload_de", + "bingeGroup": "webstreamr-meinecloud-dropload-de", "notWebReady": true, "videoSize": 1395864371, }, @@ -197,7 +208,7 @@ exports[`resolve returns sorted results 1`] = ` }, { "behaviorHints": { - "bingeGroup": "webstreamr-dropload_it", + "bingeGroup": "webstreamr-mostraguarda-dropload-it", "notWebReady": true, "videoSize": 1181116006, }, @@ -208,7 +219,7 @@ exports[`resolve returns sorted results 1`] = ` }, { "behaviorHints": { - "bingeGroup": "webstreamr-supervideo_it", + "bingeGroup": "webstreamr-mostraguarda-supervideo-it", "notWebReady": true, "videoSize": 1181116006, }, @@ -219,7 +230,7 @@ exports[`resolve returns sorted results 1`] = ` }, { "behaviorHints": { - "bingeGroup": "webstreamr-supervideo_de", + "bingeGroup": "webstreamr-meinecloud-supervideo-de", "notWebReady": true, "videoSize": 1073741824, }, @@ -230,7 +241,7 @@ exports[`resolve returns sorted results 1`] = ` }, { "behaviorHints": { - "bingeGroup": "webstreamr-doodstream_de", + "bingeGroup": "webstreamr-meinecloud-doodstream-de", "notWebReady": true, "proxyHeaders": { "request": { @@ -246,7 +257,7 @@ exports[`resolve returns sorted results 1`] = ` }, { "behaviorHints": { - "bingeGroup": "webstreamr-doodstream_it", + "bingeGroup": "webstreamr-mostraguarda-doodstream-it", "notWebReady": true, "proxyHeaders": { "request": { @@ -267,7 +278,7 @@ exports[`resolve returns sorted results 2`] = ` [ { "behaviorHints": { - "bingeGroup": "webstreamr-dropload_de", + "bingeGroup": "webstreamr-meinecloud-dropload-de", "notWebReady": true, "videoSize": 1395864371, }, @@ -278,7 +289,7 @@ exports[`resolve returns sorted results 2`] = ` }, { "behaviorHints": { - "bingeGroup": "webstreamr-dropload_it", + "bingeGroup": "webstreamr-mostraguarda-dropload-it", "notWebReady": true, "videoSize": 1181116006, }, @@ -289,7 +300,7 @@ exports[`resolve returns sorted results 2`] = ` }, { "behaviorHints": { - "bingeGroup": "webstreamr-supervideo_it", + "bingeGroup": "webstreamr-mostraguarda-supervideo-it", "notWebReady": true, "videoSize": 1181116006, }, @@ -300,7 +311,7 @@ exports[`resolve returns sorted results 2`] = ` }, { "behaviorHints": { - "bingeGroup": "webstreamr-supervideo_de", + "bingeGroup": "webstreamr-meinecloud-supervideo-de", "notWebReady": true, "videoSize": 1073741824, }, @@ -311,7 +322,7 @@ exports[`resolve returns sorted results 2`] = ` }, { "behaviorHints": { - "bingeGroup": "webstreamr-doodstream_de", + "bingeGroup": "webstreamr-meinecloud-doodstream-de", "notWebReady": true, "proxyHeaders": { "request": { @@ -327,7 +338,7 @@ exports[`resolve returns sorted results 2`] = ` }, { "behaviorHints": { - "bingeGroup": "webstreamr-doodstream_it", + "bingeGroup": "webstreamr-mostraguarda-doodstream-it", "notWebReady": true, "proxyHeaders": { "request": { @@ -343,7 +354,7 @@ exports[`resolve returns sorted results 2`] = ` }, { "behaviorHints": { - "bingeGroup": "webstreamr-external_de", + "bingeGroup": "webstreamr-meinecloud-external-de", "notWebReady": true, }, "externalUrl": "https://mixdrop.ag/e/3nzwveprim63or6", @@ -352,7 +363,7 @@ exports[`resolve returns sorted results 2`] = ` }, { "behaviorHints": { - "bingeGroup": "webstreamr-external_it", + "bingeGroup": "webstreamr-mostraguarda-external-it", "notWebReady": true, }, "externalUrl": "https://mixdrop.ag/e/vk196d6xfzwwo1",