1
0
Fork 0
mirror of https://github.com/Yetangitu/ampache synced 2025-10-04 18:29:40 +02:00

Add repeat automatically when playing democratic on localplay (fix #233)

Fix ampache.sql ACL insertion
Set API Key QRCode size to 128x128 px
This commit is contained in:
Afterster 2015-02-05 23:20:39 +01:00
parent 32bb52f9ff
commit d22e638dbc
3 changed files with 19 additions and 7 deletions

View file

@ -480,6 +480,16 @@ class Stream_Playlist
$localplay->add_url($url);
}
if (!$append) {
// We don't have metadata on Stream_URL to know its kind
// so we check the content to know if it is democratic
if (count($this->urls) == 1) {
$furl = $this->urls[0];
if (strpos($furl->url, "&demo_id=1") !== false && $furl->time == -1) {
// If democratic, repeat the song to get the next voted one.
debug_event('stream_playlist', 'Playing democratic on localplay, enabling repeat...', 5);
$localplay->repeat(true);
}
}
$localplay->play();
}