1
0
Fork 0
mirror of https://github.com/Yetangitu/ampache synced 2025-10-05 19:41:55 +02:00

New parameter to hide directplay/playlist if number of items is above the limit.

This commit is contained in:
SUTJael 2014-09-13 15:15:30 +02:00
parent c5365fd2b3
commit 1684b0535b
8 changed files with 128 additions and 30 deletions

View file

@ -445,6 +445,9 @@ class Update
$update_string = '- Add session_remember table to store remember tokens.<br />';
$version[] = array('version' => '370015','description' => $update_string);
$update_string = '- Add limit of media count for direct play preference.<br />';
$version[] = array('version' => '370016','description' => $update_string);
return $version;
}
@ -2952,4 +2955,23 @@ class Update
$retval = Dba::write($sql) ? $retval : false;
return $retval;
}
/**
* update 370016
*
* Add limit of media count for direct play preference
*/
public static function update_370016()
{
$retval = true;
$sql = "INSERT INTO `preference` (`name`,`value`,`description`,`level`,`type`,`catagory`) " .
"VALUES ('direct_play_limit','0','Limit direct play to maximum media count',25,'integer','interface')";
$retval = Dba::write($sql) ? $retval : false;
$id = Dba::insert_id();
$sql = "INSERT INTO `user_preference` VALUES (-1,?,'0')";
$retval = Dba::write($sql, array($id)) ? $retval : false;
return $retval;
}
}