diff options
author | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2009-03-01 00:10:49 +0000 |
---|---|---|
committer | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2009-03-01 00:10:49 +0000 |
commit | 6777ec1e2ec97ab6986bf6657ed64283e0ad461c (patch) | |
tree | 7a6e024cf08f55c9126c22303b057525b4f96ec2 /lib/class/stream.class.php | |
parent | a3ff87240e1f1ad271ec611ed296fd978e22e702 (diff) | |
download | ampache-6777ec1e2ec97ab6986bf6657ed64283e0ad461c.tar.gz ampache-6777ec1e2ec97ab6986bf6657ed64283e0ad461c.tar.bz2 ampache-6777ec1e2ec97ab6986bf6657ed64283e0ad461c.zip |
first work on next db update, correct play_url() removing redundent path, fix democratic play clear
Diffstat (limited to 'lib/class/stream.class.php')
-rw-r--r-- | lib/class/stream.class.php | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/class/stream.class.php b/lib/class/stream.class.php index ec8308e5..9bfb4d78 100644 --- a/lib/class/stream.class.php +++ b/lib/class/stream.class.php @@ -236,7 +236,7 @@ class Stream { public function create_simple_m3u() { header("Cache-control: public"); - header("Content-Disposition: filename=playlist.m3u"); + header("Content-Disposition: filename=ampache_playlist.m3u"); header("Content-Type: audio/x-mpegurl;"); // Flip for the poping! @@ -434,7 +434,7 @@ class Stream { } // type $xml = array(); - $xml['track']['location'] = call_user_func($type,'play_url',$media->id) . $flash_hack; + $xml['track']['location'] = call_user_func(array($type,'play_url'),$media->id) . $flash_hack; $xml['track']['identifier'] = $xml['track']['location']; $xml['track']['duration'] = $length * 1000; @@ -445,7 +445,7 @@ class Stream { xmlData::set_type('xspf'); header("Cache-control: public"); - header("Content-Disposition: filename=ampache-playlist.xspf"); + header("Content-Disposition: filename=ampache_playlist.xspf"); header("Content-Type: application/xspf+xml; charset=utf-8"); echo xmlData::header(); echo $result; @@ -569,11 +569,11 @@ class Stream { public function create_ram() { header("Cache-control: public"); - header("Content-Disposition: filename=playlist.ram"); + header("Content-Disposition: filename=ampache_playlist.ram"); header("Content-Type: audio/x-pn-realaudio ram;"); - foreach ($this->media as $song_id) { - $song = new Song($song_id); - echo $song->get_url(); + foreach ($this->media as $element) { + $type = array_shift($element); + echo $url = call_user_func(array($type,'play_url'),array_shift($element)) . "\n"; } // foreach songs } // create_ram |