summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorKarl 'vollmerk' Vollmer <vollmer@ampache.org>2007-01-27 03:05:35 +0000
committerKarl 'vollmerk' Vollmer <vollmer@ampache.org>2007-01-27 03:05:35 +0000
commitbb372c24ff948c7b3e8c0c10f56ae55349fadd4f (patch)
treef4359dea642a6deccd138752ede399d1f4a21d8d /lib
parente1b4e203f7546499ae85d8caa0b0b924a225b96a (diff)
downloadampache-bb372c24ff948c7b3e8c0c10f56ae55349fadd4f.tar.gz
ampache-bb372c24ff948c7b3e8c0c10f56ae55349fadd4f.tar.bz2
ampache-bb372c24ff948c7b3e8c0c10f56ae55349fadd4f.zip
hopefully the final commit before the 3.3.3 stable release
Diffstat (limited to 'lib')
-rw-r--r--lib/class/song.class.php31
-rw-r--r--lib/init.php2
-rw-r--r--lib/stream.lib.php1
3 files changed, 15 insertions, 19 deletions
diff --git a/lib/class/song.class.php b/lib/class/song.class.php
index c7fcd658..36785a36 100644
--- a/lib/class/song.class.php
+++ b/lib/class/song.class.php
@@ -869,29 +869,26 @@ class Song {
* stream_cmd
* test if the song type streams natively and
* if not returns a transcoding command from the config
+ * we can't use this->type because its been formated for the
+ * downsampling
*/
function stream_cmd() {
-
- $return = 'downsample_cmd';
+
+ $parts = pathinfo($this->file);
+
+
if (!$this->native_stream()) {
- switch ($this->type) {
- case 'm4a':
- $return = 'stream_cmd_m4a';
- break;
- case 'flac':
- $return = 'stream_cmd_flac';
- break;
- case 'mpc':
- $return = 'stream_cmd_mpc';
- break;
- default:
- $return = 'downsample_cmd';
- break;
- } // end switch
+ $stream_cmd = 'stream_cmd_' . $parts['extension'];
+ if (conf($stream_cmd)) {
+ return $stream_cmd;
+ }
+ else {
+ debug_event('Downsample','Error: Stream command for ' . $parts['extension'] . ' not found, using downsample','2');
+ }
} // end if not native_stream
- return $return;
+ return 'downsample_cmd';
} // end stream_cmd
diff --git a/lib/init.php b/lib/init.php
index ead55cbe..49ff4a79 100644
--- a/lib/init.php
+++ b/lib/init.php
@@ -67,7 +67,7 @@ if (!$results = read_config($configfile,0)) {
}
/** This is the version.... fluf nothing more... **/
-$results['version'] = '3.3.3 Build (004)';
+$results['version'] = '3.3.3';
$results['int_config_version'] = '1';
$results['raw_web_path'] = $results['web_path'];
diff --git a/lib/stream.lib.php b/lib/stream.lib.php
index af589273..d4163ab5 100644
--- a/lib/stream.lib.php
+++ b/lib/stream.lib.php
@@ -226,7 +226,6 @@ function start_downsample($song,$now_playing_id=0,$song_name=0) {
$song_file = escapeshellarg($song->file);
-
/* Replace Variables */
$downsample_command = conf($song->stream_cmd());
$downsample_command = str_replace("%FILE%",$song_file,$downsample_command);