summaryrefslogtreecommitdiffstats
path: root/modules
diff options
context:
space:
mode:
authorKarl 'vollmerk' Vollmer <vollmer@ampache.org>2008-06-12 06:38:09 +0000
committerKarl 'vollmerk' Vollmer <vollmer@ampache.org>2008-06-12 06:38:09 +0000
commit71dd578037b288cd79f4546dff976c5bf2c87a6b (patch)
tree1388865bae914d1f8c3a429435491b345db7ed96 /modules
parent4b4930e286690713ba83c2f18cff48bb652e7a0a (diff)
downloadampache-71dd578037b288cd79f4546dff976c5bf2c87a6b.tar.gz
ampache-71dd578037b288cd79f4546dff976c5bf2c87a6b.tar.bz2
ampache-71dd578037b288cd79f4546dff976c5bf2c87a6b.zip
slight tweaks to the shoutcast controller, fliter out non 44100 rate files also fix a typo
Diffstat (limited to 'modules')
-rw-r--r--modules/localplay/shoutcast.controller.php10
1 files changed, 8 insertions, 2 deletions
diff --git a/modules/localplay/shoutcast.controller.php b/modules/localplay/shoutcast.controller.php
index b5db0aad..76e986ae 100644
--- a/modules/localplay/shoutcast.controller.php
+++ b/modules/localplay/shoutcast.controller.php
@@ -283,10 +283,14 @@ class AmpacheShoutCast extends localplay_controller {
// Before we add this it must be a mp3
$object->format_type();
- if ($this->mime != 'audio/mpeg') {
+ if ($object->mime != 'audio/mpeg') {
debug_event('ShoutCast','Error: Unable to play ' . $this->mime . ' files with shoutcast, skipping','3');
return false;
}
+ if ($object->rate != '44100') {
+ debug_event('Shoutcast','Error: Unable to play ' . $this->rate . ' files with shoutcast, skipping','3');
+ return false;
+ }
// Take the filename and strip off the catalog's root_path and put our
@@ -294,7 +298,9 @@ class AmpacheShoutCast extends localplay_controller {
$filename = $object->file;
$catalog = new Catalog($object->catalog);
- $filename = str_replace($catalog->path,$this->local_path,$filename);
+ if ($this->local_path) {
+ $filename = str_replace($catalog->path,$this->local_path,$filename);
+ }
$this->files[] = $filename;