From 6319e26250e7b63522c397639722b88998807256 Mon Sep 17 00:00:00 2001 From: Karl 'vollmerk' Vollmer Date: Tue, 8 May 2007 04:11:39 +0000 Subject: renamed tv, fixed up the tmp playlist, added two preferences and corrected some logic in play/index.php --- lib/class/update.class.php | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) (limited to 'lib/class/update.class.php') diff --git a/lib/class/update.class.php b/lib/class/update.class.php index 55d32d31..27bc8fb5 100644 --- a/lib/class/update.class.php +++ b/lib/class/update.class.php @@ -193,7 +193,8 @@ class Update { $update_string = '- Moved Art from the Album table into album_data to improve performance.
' . '- Made some minor changes to song table to reduce size of each row.
' . - '- Moved song_ext_data to song_data to match album_data pattern.
'; + '- Moved song_ext_data to song_data to match album_data pattern.
' . + '- Added Playlist Method and Rate Limit Preferences.
'; $version[] = array('version' => '340003','description' => $update_string); @@ -612,6 +613,25 @@ class Update { $sql = "ALTER TABLE `user` DROP `offset_limit`"; $db_results = Dba::query($sql); + /* Add the rate_limit preference */ + $sql = "INSERT INTO `preferences` (`name`,`value`,`description`,`level`,`type`,`catagory`) " . + "VALUES ('rate_limit','8192','Rate Limit','100','integer','streaming')"; + $db_results = Dba::query($sql); + + /* Add the playlist_method preference and remove it from the user table */ + $sql = "INSERT INTO `preferences` (`name`,`value`,`description`,`level`,`type`,`catagory`) " . + "VALUES ('playlist_method','50','Playlist Method','5','string','streaming')"; + $db_results = Dba::query($sql); + + $sql = "SELECT `id` FROM `user`"; + $db_results = Dba::query($sql); + + User::fix_preferences('-1'); + + while ($r = Dba::fetch_assoc($db_results)) { + User::fix_preferences($r['id']); + } + self::set_version('db_version','340003'); } // update_340003 -- cgit