From 939b0598725d649053bd5b5bcee5c605174bc67b Mon Sep 17 00:00:00 2001 From: Brock H Caldwell Date: Fri, 6 Feb 2026 19:41:09 -0600 Subject: [PATCH] fix: adds download url check for monitors --- src/Download/DownloadOptionEvaluator.php | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/Download/DownloadOptionEvaluator.php b/src/Download/DownloadOptionEvaluator.php index caca695..009b99e 100644 --- a/src/Download/DownloadOptionEvaluator.php +++ b/src/Download/DownloadOptionEvaluator.php @@ -25,6 +25,10 @@ class DownloadOptionEvaluator return false; } + if (false === $this->validateDownloadUrl($result->url)) { + return false; + } + return true; }); @@ -79,4 +83,18 @@ class DownloadOptionEvaluator return false; } + + public function validateDownloadUrl(string $downloadUrl) + { + $badFileLocations = [ + 'https://torrentio.strem.fun/videos/failed_infringement_v2.mp4' => 'Removed for Copyright Infringement.', + ]; + + $headers = get_headers($downloadUrl, true); + if (array_key_exists($headers['Location'], $badFileLocations)) { + return false; + } + + return true; + } }