From b49a271f889a26e40b16fb6f78b47f2e320b40c8 Mon Sep 17 00:00:00 2001 From: Karl 'vollmerk' Vollmer Date: Wed, 11 Mar 2009 02:46:48 +0000 Subject: fix missing page headers on democratic playlist, also show the voters --- lib/class/stream.class.php | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) (limited to 'lib/class/stream.class.php') diff --git a/lib/class/stream.class.php b/lib/class/stream.class.php index 505bda49..3d05cbdd 100644 --- a/lib/class/stream.class.php +++ b/lib/class/stream.class.php @@ -89,19 +89,15 @@ class Stream { } // start /** - * manual_url_add - * This manually adds a URL to the stream object for passing - * to whatever, this is an exception for when we don't actually - * have a object_id but instead a weird or special URL + * add_urls + * Add an array of urls, it may be a single one who knows, this + * is used for things that aren't coming from media objects */ - public function manual_url_add($url) { + public function add_urls($urls=array()) { - if (is_array($url)) { - $this->urls[] = array_merge($url,$this->urls); - } - else { - $this->urls[] = $url; - } + if (!is_array($urls)) { return false; } + + $this->urls = array_merge($urls,$this->urls); } // manual_url_add @@ -520,6 +516,13 @@ class Stream { } // switch on types $localplay->add($media); } // foreach object + + /** + * Add urls after the fact + */ + foreach ($this->urls as $url) { + $localplay->add($url); + } $localplay->play(); -- cgit