mirror of
https://github.com/Yetangitu/ampache
synced 2025-10-06 11:59:56 +02:00
FS#272 - Adding songs to democratic playlist
This is more likely to fix democratic handling. Untested.
This commit is contained in:
parent
453a161a78
commit
3a8feaeeff
1 changed files with 4 additions and 1 deletions
|
@ -382,11 +382,14 @@ class Stream_Playlist {
|
||||||
public function create_democratic() {
|
public function create_democratic() {
|
||||||
$democratic = Democratic::get_current_playlist();
|
$democratic = Democratic::get_current_playlist();
|
||||||
$democratic->set_parent();
|
$democratic->set_parent();
|
||||||
|
$items = array();
|
||||||
|
|
||||||
foreach ($this->urls as $url) {
|
foreach ($this->urls as $url) {
|
||||||
$data = Stream_URL::parse($url->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);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue