summaryrefslogtreecommitdiffstats
path: root/lib/class/stream.class.php
diff options
context:
space:
mode:
authorKarl 'vollmerk' Vollmer <vollmer@ampache.org>2009-03-11 02:46:48 +0000
committerKarl 'vollmerk' Vollmer <vollmer@ampache.org>2009-03-11 02:46:48 +0000
commitb49a271f889a26e40b16fb6f78b47f2e320b40c8 (patch)
tree3480bb8a8350f5bdbacc4a3325e2c516912b43dd /lib/class/stream.class.php
parent4b191ae6bb833c399e0d5f7606354bcd8127e436 (diff)
downloadampache-b49a271f889a26e40b16fb6f78b47f2e320b40c8.tar.gz
ampache-b49a271f889a26e40b16fb6f78b47f2e320b40c8.tar.bz2
ampache-b49a271f889a26e40b16fb6f78b47f2e320b40c8.zip
fix missing page headers on democratic playlist, also show the voters
Diffstat (limited to 'lib/class/stream.class.php')
-rw-r--r--lib/class/stream.class.php25
1 files changed, 14 insertions, 11 deletions
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();