From cc455021196a890ede8c50d5390079924340fd88 Mon Sep 17 00:00:00 2001 From: DebaucheryLibrarian Date: Sun, 8 Feb 2026 03:35:10 +0100 Subject: [PATCH] Added stream host exclude config. --- config/default.js | 1 + src/media.js | 6 ++++++ tests/profiles.js | 2 ++ 3 files changed, 9 insertions(+) diff --git a/config/default.js b/config/default.js index 7bbbce9b..300118c1 100755 --- a/config/default.js +++ b/config/default.js @@ -420,6 +420,7 @@ module.exports = { streamConcurrency: 2, // max number of video streams (m3u8 etc.) to fetch and process at once flushOrphaned: true, flushWindow: 1000, + excludeStreamHostnames: [], // resource hogs }, titleSlugLength: 50, }; diff --git a/src/media.js b/src/media.js index dab65db5..4319589e 100755 --- a/src/media.js +++ b/src/media.js @@ -672,6 +672,12 @@ async function fetchHttpSource(source, tempFileTarget, hashStream) { streamQueue.define('fetchStreamSource', async ({ source, tempFileTarget, hashStream }) => { const meta = { mimetype: 'video/mp4' }; + const { hostname } = new URL(source.stream); + + if (config.media.excludeStreamHostnames.includes(hostname)) { + throw new Error(`Stream source hostname ${hostname} is excluded by config`); + } + const command = ffmpeg(source.stream) .format('mp4') .outputOptions(['-movflags frag_keyframe+empty_moov']) diff --git a/tests/profiles.js b/tests/profiles.js index 83da5ab0..c3e535ee 100644 --- a/tests/profiles.js +++ b/tests/profiles.js @@ -256,6 +256,8 @@ const actors = [ { entity: 'wakeupnfuck', name: 'Abby Lee Brazil', fields: ['avatar', 'nationality'] }, ]; +// TODO: Brazzers, MetroHD, Blowpass, FameDigital, FantasyMassage, PrideStudios, Mamacitaz, Loveherfilms, Shelovesblack, Jerkaoke + const actorScrapers = scrapers.actors; const sources = argv.sources || null;