fix(DownloadOptionEvaluator): bad logic checking filters
Some checks failed
SonarQube Scan / SonarQube Trigger (push) Failing after -50s
Some checks failed
SonarQube Scan / SonarQube Trigger (push) Failing after -50s
This commit is contained in:
@@ -21,9 +21,10 @@ class DownloadOptionEvaluator
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (false === $this->validateSize($result, $filter)) {
|
// todo: This is arbitrary- revisit in the future
|
||||||
return false;
|
//if (false === $this->validateSize($result, $filter)) {
|
||||||
}
|
// return false;
|
||||||
|
//}
|
||||||
|
|
||||||
if (false === $this->validateDownloadUrl($result->url)) {
|
if (false === $this->validateDownloadUrl($result->url)) {
|
||||||
return false;
|
return false;
|
||||||
@@ -51,15 +52,15 @@ class DownloadOptionEvaluator
|
|||||||
$valid = false;
|
$valid = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (null !== $filter->codec && in_array($result->codec, $filter->codec)) {
|
if (null !== $filter->codec && !in_array($result->codec, $filter->codec)) {
|
||||||
$valid = false;
|
$valid = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (null !== $filter->quality && in_array($result->quality, $filter->quality)) {
|
if (null !== $filter->quality && !in_array($result->quality, $filter->quality)) {
|
||||||
$valid = false;
|
$valid = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (null !== $filter->provider && in_array($result->provider, $filter->provider)) {
|
if (null !== $filter->provider && !in_array($result->provider, $filter->provider)) {
|
||||||
$valid = false;
|
$valid = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user