From dbcc24c49f6ea1b84bae58c967c166b2759dc809 Mon Sep 17 00:00:00 2001 From: Brock H Caldwell Date: Sun, 8 Feb 2026 12:34:50 -0600 Subject: [PATCH] fix(DownloadOptionEvaluator): bad logic checking filters --- src/Download/DownloadOptionEvaluator.php | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/Download/DownloadOptionEvaluator.php b/src/Download/DownloadOptionEvaluator.php index 009b99e..37af41b 100644 --- a/src/Download/DownloadOptionEvaluator.php +++ b/src/Download/DownloadOptionEvaluator.php @@ -21,9 +21,10 @@ class DownloadOptionEvaluator return false; } - if (false === $this->validateSize($result, $filter)) { - return false; - } + // todo: This is arbitrary- revisit in the future + //if (false === $this->validateSize($result, $filter)) { + // return false; + //} if (false === $this->validateDownloadUrl($result->url)) { return false; @@ -51,15 +52,15 @@ class DownloadOptionEvaluator $valid = false; } - if (null !== $filter->codec && in_array($result->codec, $filter->codec)) { + if (null !== $filter->codec && !in_array($result->codec, $filter->codec)) { $valid = false; } - if (null !== $filter->quality && in_array($result->quality, $filter->quality)) { + if (null !== $filter->quality && !in_array($result->quality, $filter->quality)) { $valid = false; } - if (null !== $filter->provider && in_array($result->provider, $filter->provider)) { + if (null !== $filter->provider && !in_array($result->provider, $filter->provider)) { $valid = false; }