diff options
-rw-r--r-- | config/ampache.cfg.php.dist | 4 | ||||
-rwxr-xr-x | docs/CHANGELOG | 4 | ||||
-rw-r--r-- | lib/class/song.class.php | 2 | ||||
-rw-r--r-- | lib/class/user.class.php | 8 | ||||
-rw-r--r-- | modules/localplay/mpd.controller.php | 4 | ||||
-rw-r--r-- | play/index.php | 1 |
6 files changed, 15 insertions, 8 deletions
diff --git a/config/ampache.cfg.php.dist b/config/ampache.cfg.php.dist index 942b5fcf..d31728fc 100644 --- a/config/ampache.cfg.php.dist +++ b/config/ampache.cfg.php.dist @@ -492,8 +492,8 @@ transcode_flac_target = mp3 transcode_mp3_target = mp3 ; These are the commands that will be run to transcode the file -transcode_cmd_flac = "flac -dc %FILE% | lame -r -b 128 -S - - " -transcode_cmd_m4a = "faad -f 2 -w %FILE% | lame -r -b 128 -S - -" +transcode_cmd_flac = "flac -dc %FILE% | lame -b %SAMPLE% -S - - " +transcode_cmd_m4a = "faad -f 2 -w %FILE% | lame -r -b %SAMPLE% -S - -" transcode_cmd_mp3 = "mp3splt -qnf %FILE% %OFFSET% %EOF% -o - | lame --mp3input -q 3 -b %SAMPLE% -S - -" # This line seems to work better for windows, switch if needed diff --git a/docs/CHANGELOG b/docs/CHANGELOG index f7f25517..6d0ade3f 100755 --- a/docs/CHANGELOG +++ b/docs/CHANGELOG @@ -4,6 +4,10 @@ -------------------------------------------------------------------------- v.3.4-Alpha4 + - Fixed incorrect extension and stream command being sent when using + transcode for type other then mp3 + - Fixed default flac downsample command, removed -r as flac decode + appears to not be raw pcm - Fixed download filename to match the catalog filename pattern - Added downloads back to stats tracking - Fixed disable/re-enable of users diff --git a/lib/class/song.class.php b/lib/class/song.class.php index 0ad9af68..8a9a6637 100644 --- a/lib/class/song.class.php +++ b/lib/class/song.class.php @@ -888,9 +888,9 @@ class Song { // Find the target for this transcode $conf_type = 'transcode_' . $this->type . '_target'; + $stream_cmd = 'transcode_cmd_' . $this->type; $this->format_type(Config::get($conf_type)); - $stream_cmd = 'transcode_cmd_' . $this->type; if (Config::get($stream_cmd)) { return $stream_cmd; } diff --git a/lib/class/user.class.php b/lib/class/user.class.php index 1fa24adb..97477ae7 100644 --- a/lib/class/user.class.php +++ b/lib/class/user.class.php @@ -137,11 +137,11 @@ class User { // Fill out the user id $user_id = $user_id ? Dba::escape($user_id) : Dba::escape($this->id); - if (!Config::get('use_auth')) { $user_id = '-1'; } - if ($user_id != '-1') { $user_limit = "AND preference.catagory != 'system'"; } + + if (!Config::get('use_auth')) { $user_id = '-1'; } if ($type != '0') { $user_limit = "AND preference.catagory = '" . Dba::escape($type) . "'"; @@ -173,7 +173,9 @@ class User { */ public function set_preferences() { - $sql = "SELECT preference.name,user_preference.value FROM preference,user_preference WHERE user_preference.user='$this->id' " . + $user_id = Dba::escape($this->id); + + $sql = "SELECT preference.name,user_preference.value FROM preference,user_preference WHERE user_preference.user='$user_id'" . "AND user_preference.preference=preference.id AND preference.type != 'system'"; $db_results = Dba::query($sql); diff --git a/modules/localplay/mpd.controller.php b/modules/localplay/mpd.controller.php index b01eac00..7fe5b778 100644 --- a/modules/localplay/mpd.controller.php +++ b/modules/localplay/mpd.controller.php @@ -190,7 +190,7 @@ class AmpacheMpd extends localplay_controller { * If no instance is passed current is used */ public function get_instance($instance='') { - + $instance = $instance ? $instance : $GLOBALS['user']->prefs['mpd_active']; $instance = Dba::escape($instance); @@ -198,7 +198,7 @@ class AmpacheMpd extends localplay_controller { $db_results = Dba::query($sql); $row = Dba::fetch_assoc($db_results); - + return $row; } // get_instance diff --git a/play/index.php b/play/index.php index 56e7fa27..64d83e86 100644 --- a/play/index.php +++ b/play/index.php @@ -254,6 +254,7 @@ if (Config::get('access_control') AND Config::get('downsample_remote')) { if (($GLOBALS['user']->prefs['transcode'] == 'always' || !$song->native_stream() || $not_local) && $GLOBALS['user']->prefs['transcode'] != 'never') { debug_event('downsample','Starting Downsample...','5'); $fp = Stream::start_downsample($song,$lastid,$song_name); + $song_name = $song->f_artist_full . " - " . $song->title . "." . $song->type; } // end if downsampling else { // Send file, possible at a byte offset |