diff options
Diffstat (limited to 'lib/class/stream_playlist.class.php')
-rw-r--r-- | lib/class/stream_playlist.class.php | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/lib/class/stream_playlist.class.php b/lib/class/stream_playlist.class.php index ae16dfb0..66b19297 100644 --- a/lib/class/stream_playlist.class.php +++ b/lib/class/stream_playlist.class.php @@ -376,13 +376,17 @@ class Stream_Playlist { /** * create_democratic * - * This 'votes' on the songs it inserts them into - * a tmp_playlist with user of -1 (System) + * This 'votes' on the songs; it inserts them into a tmp_playlist with user + * set to -1. */ public function create_democratic() { $democratic = Democratic::get_current_playlist(); $democratic->set_parent(); - $democratic->add_vote($this->urls); + + foreach ($this->urls as $url) { + $data = Stream_URL::parse($url->url); + $democratic->add_vote(array($data['type'], $data['id'])); + } } /** |