webstreamr-github/src/utils/__snapshots__/StreamResolver.test.ts.snap

382 lines
11 KiB
Text

// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
exports[`resolve adds error info 1`] = `
{
"streams": [
{
"behaviorHints": {
"bingeGroup": "webstreamr-hostercom",
"notWebReady": true,
},
"name": "WebStreamr 🇩🇪",
"title": "🔗 working1",
"url": "https://working2.com/",
},
{
"behaviorHints": {
"bingeGroup": "webstreamr-hostercom",
"notWebReady": true,
},
"name": "WebStreamr 🇩🇪",
"title": "🔗 working2",
"url": "https://working1.com/",
},
],
}
`;
exports[`resolve adds error info 2`] = `
{
"streams": [
{
"behaviorHints": {
"notWebReady": true,
},
"externalUrl": "https://example5.com/",
"name": "WebStreamr 🇩🇪",
"title": "🔗 hoster.com
❌ Request to example5.com failed with status 418 (I'm a tea pot). Request-id: test.",
},
{
"behaviorHints": {
"notWebReady": true,
},
"externalUrl": "https://example4.com/",
"name": "WebStreamr 🇩🇪",
"title": "🔗 hoster.com
❌ Remote server example4.com has issues. We can't fix this, please try later again.",
},
{
"behaviorHints": {
"notWebReady": true,
},
"externalUrl": "https://example3.com/",
"name": "WebStreamr 🇩🇪",
"title": "🔗 hoster.com
⏳ Request queue for example3.com is full. Please try again later or consider self-hosting.",
},
{
"behaviorHints": {
"notWebReady": true,
},
"externalUrl": "https://example2.com/",
"name": "WebStreamr 🇩🇪",
"title": "🔗 hoster.com
🐢 Request to example2.com timed out.",
},
{
"behaviorHints": {
"notWebReady": true,
},
"externalUrl": "https://example2.com/",
"name": "WebStreamr 🇩🇪",
"title": "🔗 hoster.com
❌ Request failed. Request-id: test.",
},
{
"behaviorHints": {
"notWebReady": true,
},
"externalUrl": "https://example.com/",
"name": "WebStreamr 🇩🇪",
"title": "🔗 hoster.com
🚦 Too many recent timeouts when requesting example.com. Please try again later.",
},
{
"behaviorHints": {
"notWebReady": true,
},
"externalUrl": "https://example.com/",
"name": "WebStreamr 🇩🇪",
"title": "🔗 hoster.com
🚦 Request to example.com was rate-limited. Please try again later or consider self-hosting.",
},
{
"behaviorHints": {
"notWebReady": true,
},
"externalUrl": "https://example.com/",
"name": "WebStreamr 🇩🇪",
"title": "🔗 hoster.com
⚠️ Request to example.com was blocked. Reason: unknown",
},
{
"behaviorHints": {
"notWebReady": true,
},
"externalUrl": "https://example.com/",
"name": "WebStreamr 🇩🇪",
"title": "🔗 hoster.com
⚠️ MediaFlow Proxy authentication failed. Please set the correct password.",
},
{
"behaviorHints": {
"notWebReady": true,
},
"externalUrl": "https://example.com/",
"name": "WebStreamr 🇩🇪",
"title": "🔗 hoster.com
⚠️ Request to example.com was blocked. Reason: cloudflare_censor",
},
{
"behaviorHints": {
"notWebReady": true,
},
"externalUrl": "https://example.com/",
"name": "WebStreamr 🇩🇪",
"title": "🔗 hoster.com
⚠️ Request to example.com was blocked. Reason: cloudflare_challenge",
},
{
"behaviorHints": {
"bingeGroup": "webstreamr-hostercom",
"notWebReady": true,
},
"name": "WebStreamr 🇩🇪",
"title": "🔗 working1",
"url": "https://working2.com/",
},
{
"behaviorHints": {
"bingeGroup": "webstreamr-hostercom",
"notWebReady": true,
},
"name": "WebStreamr 🇩🇪",
"title": "🔗 working2",
"url": "https://working1.com/",
},
],
}
`;
exports[`resolve ignores not found errors 1`] = `
{
"streams": [],
"ttl": 900000,
}
`;
exports[`resolve returns empty array if no source found anything 1`] = `
{
"streams": [],
"ttl": 900000,
}
`;
exports[`resolve returns empty array if no source supported the type 1`] = `
{
"streams": [],
"ttl": 900000,
}
`;
exports[`resolve returns info as stream if no sources were configured 1`] = `
{
"streams": [
{
"externalUrl": "http://localhost/",
"name": "WebStreamr",
"title": "⚠️ No sources found. Please re-configure the plugin.",
},
],
}
`;
exports[`resolve returns sorted results 1`] = `
[
{
"behaviorHints": {
"bingeGroup": "webstreamr-dropload_de",
"notWebReady": true,
"videoSize": 1395864371,
},
"name": "WebStreamr 🇩🇪 1080p",
"title": "des-teufels-bad-2024
💾 1.3 GB 🔗 Dropload from MeineCloud",
"url": "https://srv34.dropload.io/hls2/01/00197/lyo2h1snpe5c_h/master.m3u8?t=MZSqs3F338ocbM2eTs8X23s585dWcYuilGrNNcidNas&s=1749846846&e=14400&f=987607&srv=srv27&i=0.0&sp=0&ii=50.99.15.93&p1=srv27&p2=srv27",
},
{
"behaviorHints": {
"bingeGroup": "webstreamr-dropload_it",
"notWebReady": true,
"videoSize": 1181116006,
},
"name": "WebStreamr 🇮🇹 720p",
"title": "the-devils-bath-2024-sd-sub-ita
💾 1.1 GB 🔗 Dropload from MostraGuarda",
"url": "https://srv34.dropload.io/hls2/01/00200/xsr90y2ltdyx_h/master.m3u8?t=rsJMeR8rtWZxFi_3DOdlt98U0rvAMincCe4-awDQzHE&s=1749846846&e=14400&f=1004116&srv=srv24&i=0.0&sp=0&ii=50.99.15.93&p1=srv24&p2=srv24",
},
{
"behaviorHints": {
"bingeGroup": "webstreamr-supervideo_it",
"notWebReady": true,
"videoSize": 1181116006,
},
"name": "WebStreamr 🇮🇹 720p",
"title": "the-devils-bath-2024-sd-sub-ita
💾 1.1 GB 🔗 SuperVideo from MostraGuarda",
"url": "https://hfs311.serversicuro.cc/hls/,dnzpcjj427g4a3gyvbth53rxqgffbu4vol4o7gg7pskpzb6josghbkwhnisq,.urlset/master.m3u8",
},
{
"behaviorHints": {
"bingeGroup": "webstreamr-supervideo_de",
"notWebReady": true,
"videoSize": 1073741824,
},
"name": "WebStreamr 🇩🇪 720p",
"title": "des-teufels-bad-2024
💾 1 GB 🔗 SuperVideo from MeineCloud",
"url": "https://hfs309.serversicuro.cc/hls/,dnzpfi3d27g4a3gyvbmh5klwtl65qh654hyjtgupd6p577fze64mz3bsmdyq,.urlset/master.m3u8",
},
{
"behaviorHints": {
"bingeGroup": "webstreamr-doodstream_de",
"notWebReady": true,
"proxyHeaders": {
"request": {
"Referer": "http://dood.to",
},
},
"videoSize": 1395864371,
},
"name": "WebStreamr 🇩🇪",
"title": "des-teufels-bad-2024
💾 1.3 GB 🔗 DoodStream from MeineCloud",
"url": "https://aa360cc.cloudatacdn.com/u5kjv4jxytd3sdgge5uogji5dg4huat2pxrm2qibdbm5rmcr6fv2tcniineq/6aqs1w2xla~mocked-random-string?token=7uebebipnnhusa4xnyea1er4&expiry=639837296000",
},
{
"behaviorHints": {
"bingeGroup": "webstreamr-doodstream_it",
"notWebReady": true,
"proxyHeaders": {
"request": {
"Referer": "http://dood.to",
},
},
"videoSize": 1181116006,
},
"name": "WebStreamr 🇮🇹",
"title": "the-devils-bath-2024-sd-sub-ita
💾 1.1 GB 🔗 DoodStream from MostraGuarda",
"url": "https://et1095c.cloudatacdn.com/u5kjxj7s27d3sdgge5woezkbi7milmjrckehcrwuw63gsvytfwxlfmjzvu3a/jli1t787d1~mocked-random-string?token=aw2v2d8uhbrj2ky54d573ujk&expiry=639837296000",
},
]
`;
exports[`resolve returns sorted results 2`] = `
[
{
"behaviorHints": {
"bingeGroup": "webstreamr-dropload_de",
"notWebReady": true,
"videoSize": 1395864371,
},
"name": "WebStreamr 🇩🇪 1080p",
"title": "des-teufels-bad-2024
💾 1.3 GB 🔗 Dropload from MeineCloud",
"url": "https://srv34.dropload.io/hls2/01/00197/lyo2h1snpe5c_h/master.m3u8?t=MZSqs3F338ocbM2eTs8X23s585dWcYuilGrNNcidNas&s=1749846846&e=14400&f=987607&srv=srv27&i=0.0&sp=0&ii=50.99.15.93&p1=srv27&p2=srv27",
},
{
"behaviorHints": {
"bingeGroup": "webstreamr-dropload_it",
"notWebReady": true,
"videoSize": 1181116006,
},
"name": "WebStreamr 🇮🇹 720p",
"title": "the-devils-bath-2024-sd-sub-ita
💾 1.1 GB 🔗 Dropload from MostraGuarda",
"url": "https://srv34.dropload.io/hls2/01/00200/xsr90y2ltdyx_h/master.m3u8?t=rsJMeR8rtWZxFi_3DOdlt98U0rvAMincCe4-awDQzHE&s=1749846846&e=14400&f=1004116&srv=srv24&i=0.0&sp=0&ii=50.99.15.93&p1=srv24&p2=srv24",
},
{
"behaviorHints": {
"bingeGroup": "webstreamr-supervideo_it",
"notWebReady": true,
"videoSize": 1181116006,
},
"name": "WebStreamr 🇮🇹 720p",
"title": "the-devils-bath-2024-sd-sub-ita
💾 1.1 GB 🔗 SuperVideo from MostraGuarda",
"url": "https://hfs311.serversicuro.cc/hls/,dnzpcjj427g4a3gyvbth53rxqgffbu4vol4o7gg7pskpzb6josghbkwhnisq,.urlset/master.m3u8",
},
{
"behaviorHints": {
"bingeGroup": "webstreamr-supervideo_de",
"notWebReady": true,
"videoSize": 1073741824,
},
"name": "WebStreamr 🇩🇪 720p",
"title": "des-teufels-bad-2024
💾 1 GB 🔗 SuperVideo from MeineCloud",
"url": "https://hfs309.serversicuro.cc/hls/,dnzpfi3d27g4a3gyvbmh5klwtl65qh654hyjtgupd6p577fze64mz3bsmdyq,.urlset/master.m3u8",
},
{
"behaviorHints": {
"bingeGroup": "webstreamr-doodstream_de",
"notWebReady": true,
"proxyHeaders": {
"request": {
"Referer": "http://dood.to",
},
},
"videoSize": 1395864371,
},
"name": "WebStreamr 🇩🇪",
"title": "des-teufels-bad-2024
💾 1.3 GB 🔗 DoodStream from MeineCloud",
"url": "https://aa360cc.cloudatacdn.com/u5kjv4jxytd3sdgge5uogji5dg4huat2pxrm2qibdbm5rmcr6fv2tcniineq/6aqs1w2xla~mocked-random-string?token=7uebebipnnhusa4xnyea1er4&expiry=639837296000",
},
{
"behaviorHints": {
"bingeGroup": "webstreamr-doodstream_it",
"notWebReady": true,
"proxyHeaders": {
"request": {
"Referer": "http://dood.to",
},
},
"videoSize": 1181116006,
},
"name": "WebStreamr 🇮🇹",
"title": "the-devils-bath-2024-sd-sub-ita
💾 1.1 GB 🔗 DoodStream from MostraGuarda",
"url": "https://et1095c.cloudatacdn.com/u5kjxj7s27d3sdgge5woezkbi7milmjrckehcrwuw63gsvytfwxlfmjzvu3a/jli1t787d1~mocked-random-string?token=aw2v2d8uhbrj2ky54d573ujk&expiry=639837296000",
},
{
"behaviorHints": {
"bingeGroup": "webstreamr-external_de",
"notWebReady": true,
},
"externalUrl": "https://mixdrop.ag/e/3nzwveprim63or6",
"name": "WebStreamr 🇩🇪 ⚠️ external",
"title": "🔗 mixdrop.ag from MeineCloud",
},
{
"behaviorHints": {
"bingeGroup": "webstreamr-external_it",
"notWebReady": true,
},
"externalUrl": "https://mixdrop.ag/e/vk196d6xfzwwo1",
"name": "WebStreamr 🇮🇹 ⚠️ external",
"title": "🔗 mixdrop.ag from MostraGuarda",
},
]
`;
exports[`resolve returns source errors as stream 1`] = `
{
"streams": [],
}
`;
exports[`resolve returns source errors as stream 2`] = `
{
"streams": [
{
"externalUrl": "https://meinecloud.click",
"name": "WebStreamr",
"title": "🔗 MeineCloud
❌ Request failed. Request-id: test.",
},
],
}
`;