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\Config\AmpConfig; 24use Ampache\Repository\Model\Art; 25use Ampache\Module\Api\Ajax; 26use Ampache\Module\Playback\Stream_Playlist; 27use Ampache\Module\Util\Ui; 28 29?> 30 31<?php Ui::show_box_top($radio->f_name . ' ' . T_('Details'), 'box box_live_stream_details'); ?> 32<div class="item_right_info"> 33 <?php 34 $thumb = Ui::is_grid_view('live_stream') ? 2 : 11; 35 Art::display('live_stream', $radio->id, $radio->f_name, $thumb); ?> 36</div> 37<dl class="media_details"> 38<dt><?php echo T_('Action'); ?></dt> 39 <dd> 40 <?php if (AmpConfig::get('directplay')) { ?> 41 <?php echo Ajax::button('?page=stream&action=directplay&object_type=live_stream&object_id=' . $radio->id, 'play', T_('Play'), 'play_live_stream_' . $radio->id); ?> 42 <?php if (Stream_Playlist::check_autoplay_next()) { ?> 43 <?php echo Ajax::button('?page=stream&action=directplay&object_type=live_stream&object_id=' . $radio->id . '&playnext=true', 'play_next', T_('Play next'), 'nextplay_live_stream_' . $radio->id); ?> 44 <?php 45 } ?> 46 <?php if (Stream_Playlist::check_autoplay_append()) { ?> 47 <?php echo Ajax::button('?page=stream&action=directplay&object_type=live_stream&object_id=' . $radio->id . '&append=true', 'play_add', T_('Play last'), 'addplay_live_stream_' . $radio->id); ?> 48 <?php 49 } ?> 50 <?php 51 } ?> 52 <?php echo Ajax::button('?action=basket&type=live_stream&id=' . $radio->id, 'add', T_('Add to Temporary Playlist'), 'add_live_stream_' . $radio->id); ?> 53 </dd> 54<?php 55 $itemprops[T_('Name')] = $radio->f_name; 56 $itemprops[T_('Website')] = scrub_out($radio->site_url); 57 $itemprops[T_('Stream')] = $radio->f_url_link; 58 $itemprops[T_('Codec')] = scrub_out($video->codec); 59 60 foreach ($itemprops as $key => $value) { 61 if (trim($value)) { 62 echo "<dt>" . T_($key) . "</dt><dd>" . $value . "</dd>"; 63 } 64 } ?> 65</dl> 66<?php Ui::show_box_bottom(); ?> 67