From 1e6ef4b8a0f559f74181d2d140ad1c08a8295c30 Mon Sep 17 00:00:00 2001 From: Karl 'vollmerk' Vollmer Date: Tue, 3 Jun 2008 07:27:02 +0000 Subject: prevent non-mp3s from being passed to poor old shoutcast --- lib/class/song.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/class') 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) { -- cgit