1<?php 2/* vim:set softtabstop=4 shiftwidth=4 expandtab: */ 3/** 4 * 5 * LICENSE: GNU Affero General Public License, version 3 (AGPL-3.0-or-later) 6 * Copyright 2001 - 2020 Ampache.org 7 * 8 * This program is free software: you can redistribute it and/or modify 9 * it under the terms of the GNU Affero General Public License as published by 10 * the Free Software Foundation, either version 3 of the License, or 11 * (at your option) any later version. 12 * 13 * This program is distributed in the hope that it will be useful, 14 * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 * GNU Affero General Public License for more details. 17 * 18 * You should have received a copy of the GNU Affero General Public License 19 * along with this program. If not, see <https://www.gnu.org/licenses/>. 20 * 21 */ 22 23use Ampache\Module\Api\Ajax; 24use Ampache\Repository\Model\Browse; 25use Ampache\Module\Util\Ui; 26 27$status = $localplay->status(); 28$now_playing = $status['track_title']; 29if (!empty($status['track_album'])) { 30 $now_playing .= ' - ' . $status['track_album'] . ' - ' . $status['track_artist']; 31} ?> 32<?php Ajax::start_container('localplay_status'); ?> 33<?php Ui::show_box_top(T_('Localplay Control') . ' - ' . strtoupper($localplay->type), 'box box_localplay_status'); ?> 34<?php echo T_('Now Playing'); ?>: <i><?php echo $now_playing; ?></i> 35<div id="information_actions"> 36 <ul> 37 <li> 38 <?php echo T_('Volume'); ?>: <?php echo $status['volume']; ?>% 39 </li> 40 <li> 41 <?php echo print_bool($status['repeat']); ?> | 42 <?php echo Ajax::text('?page=localplay&action=repeat&value=' . invert_bool($status['repeat']), print_bool(invert_bool($status['repeat'])), 'localplay_repeat'); ?> 43 <?php echo T_('Repeat'); ?> 44 </li> 45 <li> 46 <?php echo print_bool($status['random']); ?> | 47 <?php echo Ajax::text('?page=localplay&action=random&value=' . invert_bool($status['random']), print_bool(invert_bool($status['random'])), 'localplay_random'); ?> 48 <?php echo T_('Random'); ?> 49 </li> 50 <li> 51 <?php echo Ajax::button('?page=localplay&action=command&command=delete_all', 'delete', T_('Clear Playlist'), 'localplay_clear_all'); ?><?php echo T_('Clear Playlist'); ?> 52 </li> 53 </ul> 54</div> 55 56<?php 57 $browse = new Browse(); 58 $browse->set_type('playlist_localplay'); 59 $browse->set_static_content(true); 60 $browse->show_objects($objects); 61 $browse->store(); ?> 62<?php Ui::show_box_bottom(); ?> 63<?php Ajax::end_container(); ?> 64