From 4ae5f5c7f57ad94653616d11dc2a69ad0a990d19 Mon Sep 17 00:00:00 2001 From: pb1dft Date: Wed, 11 Oct 2006 20:59:54 +0000 Subject: fixed delay error in XSPF playlist, added activity column to admin/users --- lib/class/stream.class.php | 49 +++++++++++++++++++++++----------------------- 1 file changed, 25 insertions(+), 24 deletions(-) (limited to 'lib') diff --git a/lib/class/stream.class.php b/lib/class/stream.class.php index 25f3707f..56e701d8 100644 --- a/lib/class/stream.class.php +++ b/lib/class/stream.class.php @@ -182,36 +182,37 @@ class Stream { */ function create_xspf() { - header("Cache-control: public"); - header("Content-Disposition: filename=playlist.xspf"); - header("Content-Type: application/xspf+xml;"); - echo "\n"; - echo "\n"; - echo " Ampache XSPF Playlist\n"; - echo " " . conf('site_title') . "\n"; - echo " " . conf('site_title') . "\n"; - echo " ". conf('web_path') ."\n"; - echo " \n\n\n\n"; - + $playlist = " + + Ampache XSPF Playlist + " . conf('site_title') . " + " . conf('site_title') . " + ". conf('web_path') ." + \n\n\n\n"; + foreach ($this->songs as $song_id) { $song = new Song($song_id); $song->format_song(); $url = $song->get_url(); $song_name = $song->f_artist_full . " - " . $song->title . "." . $song->type; - echo " \n"; - echo " $url\n"; - echo " $url\n"; - echo " " . $song->title . "\n"; - echo " " . $song->f_artist_full . "\n"; - echo " \n"; - echo " " . conf('web_path') . "/albums.php?action=show&album=" . $song->album . "\n"; - echo " " . conf('web_path') . "/albumart.php?id=" . $song->album . "&thumb=2" . "\n"; - echo " " . $song->f_album_full . "\n"; - echo " " . $song->time . "\n"; - echo " \n\n\n"; + $playlist .= " \n"; + $playlist .= " $url\n"; + $playlist .= " $url\n"; + $playlist .= " " . $song->title . "\n"; + $playlist .= " " . $song->f_artist_full . "\n"; + $playlist .= " \n"; + $playlist .= " " . conf('web_path') . "/albums.php?action=show&album=" . $song->album . "\n"; + $playlist .= " " . conf('web_path') . "/albumart.php?id=" . $song->album . "&thumb=2" . "\n"; + $playlist .= " " . $song->f_album_full . "\n"; + $playlist .= " " . $song->time . "\n"; + $playlist .= " \n\n\n"; } // end foreach - echo " \n"; - echo "\n"; + $playlist .= " \n"; + $playlist .= "\n"; + header("Cache-control: public"); + header("Content-Disposition: filename=playlist.xspf"); + header("Content-Type: application/xspf+xml;"); + echo $playlist; } // create_xspf -- cgit