mirror of
https://github.com/Yetangitu/ampache
synced 2025-10-03 17:59:21 +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:
parent
32bb52f9ff
commit
d22e638dbc
3 changed files with 19 additions and 7 deletions
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
|
@ -60,12 +60,12 @@ CREATE TABLE IF NOT EXISTS `access_list` (
|
|||
--
|
||||
|
||||
INSERT INTO `access_list` (`id`, `name`, `start`, `end`, `level`, `type`, `user`, `enabled`) VALUES
|
||||
(1, 'DEFAULTv4', '\0\0\0\0', '<EFBFBD><EFBFBD><EFBFBD><EFBFBD>', 75, 'interface', -1, 1),
|
||||
(2, 'DEFAULTv4', '\0\0\0\0', '<EFBFBD><EFBFBD><EFBFBD><EFBFBD>', 75, 'stream', -1, 1),
|
||||
(3, 'DEFAULTv4', '\0\0\0\0', '<EFBFBD><EFBFBD><EFBFBD><EFBFBD>', 75, 'rpc', -1, 1),
|
||||
(4, 'DEFAULTv6', '\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0', '<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>', 75, 'interface', -1, 1),
|
||||
(5, 'DEFAULTv6', '\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0', '<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>', 75, 'stream', -1, 1);
|
||||
(6, 'DEFAULTv6', '\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0', '<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>', 75, 'rpc', -1, 1);
|
||||
(1, 'DEFAULTv4', '\0\0\0\0', 'ÿÿÿÿ', 75, 'interface', -1, 1),
|
||||
(2, 'DEFAULTv4', '\0\0\0\0', 'ÿÿÿÿ', 75, 'stream', -1, 1),
|
||||
(3, 'DEFAULTv4', '\0\0\0\0', 'ÿÿÿÿ', 75, 'rpc', -1, 1),
|
||||
(4, 'DEFAULTv6', '\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0', 'ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ', 75, 'interface', -1, 1),
|
||||
(5, 'DEFAULTv6', '\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0', 'ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ', 75, 'stream', -1, 1);
|
||||
(6, 'DEFAULTv6', '\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0', 'ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ', 75, 'rpc', -1, 1);
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
|
|
|
@ -106,8 +106,10 @@ $display_fields = (array) AmpConfig::get('registration_display_fields');
|
|||
$apikey_qrcode .= "#ssl=true";
|
||||
}
|
||||
?>
|
||||
<br />
|
||||
<a href="<?php echo $apikey_qrcode; ?>" rel="nohtml"><div id="apikey_qrcode"></div></a>
|
||||
<script language="javascript" type="text/javascript">$('#apikey_qrcode').qrcode({text: '<?php echo $apikey_qrcode; ?>', width: 96, height: 96});</script>
|
||||
<br />
|
||||
<script language="javascript" type="text/javascript">$('#apikey_qrcode').qrcode({width: 128, height: 128, text: '<?php echo $apikey_qrcode; ?>'});</script>
|
||||
<?php echo $client->apikey; ?>
|
||||
<?php } ?>
|
||||
</span>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue