summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--config/ampache.cfg.php.dist2
-rw-r--r--lib/stream.lib.php7
2 files changed, 5 insertions, 4 deletions
diff --git a/config/ampache.cfg.php.dist b/config/ampache.cfg.php.dist
index 2e832621..cbd73113 100644
--- a/config/ampache.cfg.php.dist
+++ b/config/ampache.cfg.php.dist
@@ -371,7 +371,7 @@ search_type = fuzzy
# %SAMPLE% = sample rate
# %EOF% = end of file in min.sec
# DEFAULT: mp3splt -qnf "%FILE%" %OFFSET% %EOF% -o - | lame --mp3input -q 3 -b %SAMPLE% -S - -
-downsample_cmd = mp3splt -qnf "%FILE%" %OFFSET% %EOF% -o - | lame --mp3input -q 3 -b %SAMPLE% -S - -
+downsample_cmd = mp3splt -qnf %FILE% %OFFSET% %EOF% -o - | lame --mp3input -q 3 -b %SAMPLE% -S - -
#######################################################
# These are commands used to transcode non-streaming
diff --git a/lib/stream.lib.php b/lib/stream.lib.php
index f1f0a366..1415a6fe 100644
--- a/lib/stream.lib.php
+++ b/lib/stream.lib.php
@@ -234,19 +234,20 @@ function start_downsample($song,$now_playing_id=0,$song_name=0) {
$eofss = floor($song->time-$eofmm*60);
$eof = sprintf("%02d.%02d",$eofmm,$eofss);
+ $song_file = escapeshellarg($song->file);
/* Replace Variables */
$downsample_command = conf($song->stream_cmd());
- $downsample_command = str_replace("%FILE%",$song->file,$downsample_command);
+ $downsample_command = str_replace("%FILE%",$song_file,$downsample_command);
$downsample_command = str_replace("%OFFSET%",$offset,$downsample_command);
$downsample_command = str_replace("%EOF%",$eof,$downsample_command);
$downsample_command = str_replace("%SAMPLE%",$sample_rate,$downsample_command);
// If we are debugging log this event
- if (conf('debug')) {
+ //if (conf('debug')) {
$message = "Start Downsample: $downsample_command";
log_event($GLOBALS['user']->username,' downsample ',$message);
- } // if debug
+ //} // if debug
$fp = @popen($downsample_command, 'r');