CC-4223: Smart playlists: BPM criteria should have numeric modifiers
-done
This commit is contained in:
parent
1dbdadef62
commit
ea621fd9dc
7 changed files with 31 additions and 22 deletions
|
@ -1148,7 +1148,7 @@ EOT;
|
|||
// e.g 192kps is stored as 192000
|
||||
$spCriteriaValue = $criteria['value']*1000;
|
||||
} else {
|
||||
$spCriteriaValue = $criteria['value'];
|
||||
$spCriteriaValue = addslashes($criteria['value']);
|
||||
}
|
||||
|
||||
if ($spCriteriaModifier == "starts with") {
|
||||
|
@ -1158,15 +1158,15 @@ EOT;
|
|||
} else if ($spCriteriaModifier == "contains" || $spCriteriaModifier == "does not contain") {
|
||||
$spCriteriaValue = "%$spCriteriaValue%";
|
||||
} else if ($spCriteriaModifier == "is in the range") {
|
||||
$spCriteriaValue = "$spCriteria > '$spCriteriaValue' AND $spCriteria < '$criteria[extra]'";
|
||||
$spCriteriaValue = "$spCriteria > '$spCriteriaValue' AND $spCriteria <= '$criteria[extra]'";
|
||||
}
|
||||
|
||||
$spCriteriaModifier = self::$modifier2CriteriaMap[$spCriteriaModifier];
|
||||
try{
|
||||
if ($i > 0) {
|
||||
$qry->addOr($spCriteria, addslashes($spCriteriaValue), $spCriteriaModifier);
|
||||
$qry->addOr($spCriteria, $spCriteriaValue, $spCriteriaModifier);
|
||||
} else {
|
||||
$qry->add($spCriteria, addslashes($spCriteriaValue), $spCriteriaModifier);
|
||||
$qry->add($spCriteria, $spCriteriaValue, $spCriteriaModifier);
|
||||
}
|
||||
}catch (Exception $e){
|
||||
Logging::log($e);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue