diff options
author | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2007-01-08 02:32:45 +0000 |
---|---|---|
committer | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2007-01-08 02:32:45 +0000 |
commit | 3460950693c609876022a02eb5f42a59c768029e (patch) | |
tree | 4ea3cad99ebd54630f896832ba682d5c25fd3726 /lib/class/stream.class.php | |
parent | 47628fb4b901a5737743264ba14dca52be64a268 (diff) | |
download | ampache-3460950693c609876022a02eb5f42a59c768029e.tar.gz ampache-3460950693c609876022a02eb5f42a59c768029e.tar.bz2 ampache-3460950693c609876022a02eb5f42a59c768029e.zip |
tweaked album of the moment mojo and theoritical fix for flash player
Diffstat (limited to 'lib/class/stream.class.php')
-rw-r--r-- | lib/class/stream.class.php | 34 |
1 files changed, 21 insertions, 13 deletions
diff --git a/lib/class/stream.class.php b/lib/class/stream.class.php index c505b380..c27ef17a 100644 --- a/lib/class/stream.class.php +++ b/lib/class/stream.class.php @@ -236,21 +236,29 @@ class Stream { */ function create_xspf() { + $flash_hack = ''; + + if (isset($_REQUEST['flash_hack'])) { + $flash_hack = '&flash_hack=' . $_REQUEST['flash_hack']; + if (!conf('require_session')) { $flash_hack .= '&sid=' . session_id(); } + } + + // Itterate through the songs foreach ($this->songs as $song_id) { - $song = new Song($song_id); - $song->format_song(); - - $xml = array(); - $xml['track']['location'] = $song->get_url(); - $xml['track']['identifier'] = $xml['track']['location']; - $xml['track']['title'] = $song->title; - $xml['track']['creator'] = $song->f_artist_full; - $xml['track']['info'] = conf('web_path') . "/albums.php?action=show&album=" . $song->album; - $xml['track']['image'] = conf('web_path') . "/image.php?id=" . $song->album . "&&thumb=3&sid=" . session_id(); - $xml['track']['album'] = $song->f_album_full; - $xml['track']['duration'] = $song->time; - $result .= xml_from_array($xml,1,'xspf'); + $song = new Song($song_id); + $song->format_song(); + + $xml = array(); + $xml['track']['location'] = $song->get_url() . $flash_hack; + $xml['track']['identifier'] = $xml['track']['location']; + $xml['track']['title'] = $song->title; + $xml['track']['creator'] = $song->f_artist_full; + $xml['track']['info'] = conf('web_path') . "/albums.php?action=show&album=" . $song->album; + $xml['track']['image'] = conf('web_path') . "/image.php?id=" . $song->album . "&thumb=3&sid=" . session_id(); + $xml['track']['album'] = $song->f_album_full; + $xml['track']['duration'] = $song->time; + $result .= xml_from_array($xml,1,'xspf'); } // end foreach |