From 3a8feaeeffe9b96b67ceb49f10295deb088ce4e6 Mon Sep 17 00:00:00 2001 From: Paul Arthur Date: Thu, 7 Feb 2013 22:41:55 -0500 Subject: FS#272 - Adding songs to democratic playlist This is more likely to fix democratic handling. Untested. --- lib/class/stream_playlist.class.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'lib/class') 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); } /** -- cgit