summaryrefslogtreecommitdiffstats
path: root/lib/class/update.class.php
diff options
context:
space:
mode:
authorKarl 'vollmerk' Vollmer <vollmer@ampache.org>2007-05-08 04:11:39 +0000
committerKarl 'vollmerk' Vollmer <vollmer@ampache.org>2007-05-08 04:11:39 +0000
commit6319e26250e7b63522c397639722b88998807256 (patch)
tree1d72b81a8c0cc99f1355130cef449b302ed9fda3 /lib/class/update.class.php
parent7715ec7cf0ec34ef7c540ff9921d2fde4ce7ff9b (diff)
downloadampache-6319e26250e7b63522c397639722b88998807256.tar.gz
ampache-6319e26250e7b63522c397639722b88998807256.tar.bz2
ampache-6319e26250e7b63522c397639722b88998807256.zip
renamed tv, fixed up the tmp playlist, added two preferences and corrected some logic in play/index.php
Diffstat (limited to 'lib/class/update.class.php')
-rw-r--r--lib/class/update.class.php22
1 files changed, 21 insertions, 1 deletions
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.<br />' .
'- Made some minor changes to song table to reduce size of each row.<br />' .
- '- Moved song_ext_data to song_data to match album_data pattern.<br />';
+ '- Moved song_ext_data to song_data to match album_data pattern.<br />' .
+ '- Added Playlist Method and Rate Limit Preferences.<br />';
$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