summaryrefslogtreecommitdiffstats
path: root/lib/class/song.class.php
diff options
context:
space:
mode:
authorKarl 'vollmerk' Vollmer <vollmer@ampache.org>2008-06-03 07:27:02 +0000
committerKarl 'vollmerk' Vollmer <vollmer@ampache.org>2008-06-03 07:27:02 +0000
commit1e6ef4b8a0f559f74181d2d140ad1c08a8295c30 (patch)
treea81352e10c9a9af91a59341fadb5d3c88feb0877 /lib/class/song.class.php
parentf106ce0683c593a6cee40d056809dee10399a234 (diff)
downloadampache-1e6ef4b8a0f559f74181d2d140ad1c08a8295c30.tar.gz
ampache-1e6ef4b8a0f559f74181d2d140ad1c08a8295c30.tar.bz2
ampache-1e6ef4b8a0f559f74181d2d140ad1c08a8295c30.zip
prevent non-mp3s from being passed to poor old shoutcast
Diffstat (limited to 'lib/class/song.class.php')
-rw-r--r--lib/class/song.class.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/class/song.class.php b/lib/class/song.class.php
index b4541cf5..806a81f9 100644
--- a/lib/class/song.class.php
+++ b/lib/class/song.class.php
@@ -192,8 +192,8 @@ class Song extends database_object {
$this->type = $override;
}
else {
- preg_match('/\.([A-Za-z0-9]+)$/', $this->file,$results);
- $this->type = strtolower($results['1']);
+ $data = pathinfo($this->file);
+ $this->type = strtolower($data['extension']);
}
switch ($this->type) {