summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bin/migrate_config.inc5
-rw-r--r--lib/class/update.class.php35
-rw-r--r--templates/show_test_config.inc.php3
3 files changed, 42 insertions, 1 deletions
diff --git a/bin/migrate_config.inc b/bin/migrate_config.inc
index fe5e907d..713a1656 100644
--- a/bin/migrate_config.inc
+++ b/bin/migrate_config.inc
@@ -30,6 +30,11 @@ $translate = array('local_host'=>'database_hostname',
'local_username'=>'database_username',
'local_pass'=>'database_password',
'local_length'=>'session_length',
+ 'stream_cmd_flac'=>'transcode_cmd_flac',
+ 'stream_cmd_mp3'=>'transcode_cmd_mp3',
+ 'stream_cmd_m4a'=>'transcode_cmd_m4a',
+ 'stream_cmd_ogg'=>'transcode_cmd_ogg',
+ 'stream_cmd_mpc'=>'transcode_cmd_mpc',
'sess_name'=>'session_name',
'sess_cookielife'=>'session_cookielife',
'sess_cookiesecure'=>'session_cookiesecure');
diff --git a/lib/class/update.class.php b/lib/class/update.class.php
index 9ccd966b..bd1be7af 100644
--- a/lib/class/update.class.php
+++ b/lib/class/update.class.php
@@ -210,6 +210,11 @@ class Update {
$version[] = array('version' => '340005','description' => $update_string);
+ $update_string = '- Remove Random Method config option, ended up being useless.<br />' .
+ '- Check and change album_data.art to a MEDIUMBLOB if needed.<br />';
+
+ $version[] = array('version' => '340006','description' => $update_string);
+
return $version;
} // populate_version
@@ -769,9 +774,37 @@ class Update {
*/
public static function update_340006() {
- $sql = "ALTER TABLE `album_data` CHANGE `art` `art` MEDIUMBLOB NULL DEFAULT NULL";
+ $sql = "DESCRIBE `album_data`";
+ $db_results = Dba::query($sql);
+
+ while ($row = Dba::fetch_assoc($db_results)) {
+ if ($row['Field'] == 'art' AND $row['Type'] == 'blob') {
+ $blob_needed = true;
+ }
+ } // end while
+ if ($blob_needed) {
+ $sql = "ALTER TABLE `album_data` CHANGE `art` `art` MEDIUMBLOB NULL DEFAULT NULL";
+ $db_results = Dba::query($sql);
+ }
+
+ // No matter what remove that random method preference
+ $sql = "DELETE FROM `preference` WHERE `name`='random_method'";
$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','340006');
+
+ return true;
+
+
} // update_340006
} // end update class
diff --git a/templates/show_test_config.inc.php b/templates/show_test_config.inc.php
index 27d93b45..986fb263 100644
--- a/templates/show_test_config.inc.php
+++ b/templates/show_test_config.inc.php
@@ -69,6 +69,9 @@ method simply comment it out valid values are<br />
An array of Amazon sites to search. NOTE: This will search each of these sites in turn so don't expect it
to be lightning fast! It is strongly recommended that only one of these is selected at any<br />
<br />
+<strong>downsample_cmd</strong><br />
+This variable no longer exists, all downsampling/transcoding is handled by the transcode_* please see config file for details.
+<br />
</div>
<div id="bottom">
<p><b>Ampache Debug.</b><br />