CC-4149: Playlist Builder: Fail to generate Smart Playlist with 5000 items
- set the items limit to 500
This commit is contained in:
parent
d05661afff
commit
2f8d0b77fa
|
@ -294,7 +294,7 @@ EOT;
|
||||||
return array($value, $modifier);
|
return array($value, $modifier);
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
// this function returns sum of all track length under this block.
|
||||||
public function getStaticLength(){
|
public function getStaticLength(){
|
||||||
$sql = "SELECT SUM(cliplength) as length FROM cc_blockcontents WHERE block_id={$this->id}";
|
$sql = "SELECT SUM(cliplength) as length FROM cc_blockcontents WHERE block_id={$this->id}";
|
||||||
$r = $this->con->query($sql);
|
$r = $this->con->query($sql);
|
||||||
|
@ -951,8 +951,10 @@ EOT;
|
||||||
} else {
|
} else {
|
||||||
if ($data['etc']['sp_limit_value'] == "" || floatval($data['etc']['sp_limit_value']) <= 0) {
|
if ($data['etc']['sp_limit_value'] == "" || floatval($data['etc']['sp_limit_value']) <= 0) {
|
||||||
$error[] = "Limit cannot be empty or smaller than 0";
|
$error[] = "Limit cannot be empty or smaller than 0";
|
||||||
} else if (floatval($data['etc']['sp_limit_value']) < 1) {
|
} else if (!ctype_digit($data['etc']['sp_limit_value'])) {
|
||||||
$error[] = "The value should be an integer";
|
$error[] = "The value should be an integer";
|
||||||
|
} else if (intval($data['etc']['sp_limit_value']) > 500) {
|
||||||
|
$error[] = "500 is the max item limit value you can set";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue