summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Arthur <paul.arthur@flowerysong.com>2013-02-07 22:41:55 -0500
committerPaul Arthur <paul.arthur@flowerysong.com>2013-02-07 22:42:44 -0500
commit3a8feaeeffe9b96b67ceb49f10295deb088ce4e6 (patch)
tree8177b4d701f4f531d93f9b9e9ecb9484fb7ce992
parent453a161a78acf07926a9ad7a8afef7cb07b23e7b (diff)
downloadampache-3a8feaeeffe9b96b67ceb49f10295deb088ce4e6.tar.gz
ampache-3a8feaeeffe9b96b67ceb49f10295deb088ce4e6.tar.bz2
ampache-3a8feaeeffe9b96b67ceb49f10295deb088ce4e6.zip
FS#272 - Adding songs to democratic playlist
This is more likely to fix democratic handling. Untested.
-rw-r--r--lib/class/stream_playlist.class.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/class/stream_playlist.class.php b/lib/class/stream_playlist.class.php
index 66b19297..3046b7a1 100644
--- a/lib/class/stream_playlist.class.php
+++ b/lib/class/stream_playlist.class.php
@@ -382,11 +382,14 @@ class Stream_Playlist {
public function create_democratic() {
$democratic = Democratic::get_current_playlist();
$democratic->set_parent();
+ $items = array();
foreach ($this->urls as $url) {
$data = Stream_URL::parse($url->url);
- $democratic->add_vote(array($data['type'], $data['id']));
+ $items[] = array($data['type'], $data['id']);
}
+
+ $democratic->add_vote($items);
}
/**