diff --git a/lib/class/live_stream.class.php b/lib/class/live_stream.class.php index 9de1b958..5db6ac26 100644 --- a/lib/class/live_stream.class.php +++ b/lib/class/live_stream.class.php @@ -100,8 +100,8 @@ class Live_Stream extends database_object implements media, library_item public function format($details = true) { // Default link used on the rightbar - $this->f_name = scrub_out($this->name); - $this->link = AmpConfig::get('web_path') . '/radio.php?action=show&radio=' . scrub_out($this->id); + $this->f_name = scrub_out($this->name); + $this->link = AmpConfig::get('web_path') . '/radio.php?action=show&radio=' . scrub_out($this->id); $this->f_link = "link . "\">" . $this->f_name . ""; $this->f_name_link = "site_url . "\">" . $this->f_name . ""; $this->f_url_link = "url . "\">" . $this->url . ""; diff --git a/lib/class/song.class.php b/lib/class/song.class.php index a977fb19..c3581e4d 100644 --- a/lib/class/song.class.php +++ b/lib/class/song.class.php @@ -280,6 +280,10 @@ class Song extends database_object implements media, library_item * @var string $f_composer */ public $f_composer; + /** + * @var string $f_license + */ + public $f_license; /* Setting Variables */ /** @@ -1472,6 +1476,12 @@ class Song extends database_object implements media, library_item $this->f_publisher = $this->label; $this->f_composer = $this->composer; + + if (AmpConfig::get('licensing') && $this->license) { + $license = new License($this->license); + $license->format(); + $this->f_license = $license->f_link; + } } // format /** diff --git a/lib/class/stream_playlist.class.php b/lib/class/stream_playlist.class.php index 5b2bacb3..8d0ae6d3 100644 --- a/lib/class/stream_playlist.class.php +++ b/lib/class/stream_playlist.class.php @@ -195,7 +195,7 @@ class Stream_Playlist if (!empty($object->site_url)) { $url['title'] .= ' (' . $object->site_url . ')'; } - $url['codec'] = $object->codec; + $url['codec'] = $object->codec; $url['image_url'] = Art::url($object->id, 'live_stream', $api_session, (AmpConfig::get('ajax_load') ? 3 : 4)); break; case 'song_preview': diff --git a/modules/plugins/MOTDHome/MOTDHome.plugin.php b/modules/plugins/MOTDHome/MOTDHome.plugin.php deleted file mode 100644 index 0e2d1450..00000000 --- a/modules/plugins/MOTDHome/MOTDHome.plugin.php +++ /dev/null @@ -1,95 +0,0 @@ -. - * - */ - -class AmpacheMOTDHome -{ - public $name = 'Message of the Day'; - public $categories = 'home'; - public $description = 'Message of the Day on homepage'; - public $url = ''; - public $version = '000001'; - public $min_ampache = '370040'; - public $max_ampache = '999999'; - - /** - * Constructor - * This function does nothing... - */ - public function __construct() - { - return true; - } - - /** - * install - * This is a required plugin function. It inserts our preferences - * into Ampache - */ - public function install() - { - return true; - } - - /** - * uninstall - * This is a required plugin function. It removes our preferences from - * the database returning it to its original form - */ - public function uninstall() - { - return true; - } - - /** - * upgrade - * This is a recommended plugin function - */ - public function upgrade() - { - return true; - } - - /** - * display_home - * This display the module in home page - */ - public function display_home() - { - if (@is_readable(AmpConfig::get('prefix') . '/config/motd.php')) { - echo '
'; - UI::show_box_top(T_('Message of the Day')); - require_once AmpConfig::get('prefix') . '/config/motd.php'; - UI::show_box_bottom(); - echo '
'; - } - } - - /** - * load - * This loads up the data we need into this object, this stuff comes - * from the preferences. - */ - public function load($user) - { - return true; - } -} diff --git a/templates/show_index.inc.php b/templates/show_index.inc.php index f849d46c..03e8c9f7 100644 --- a/templates/show_index.inc.php +++ b/templates/show_index.inc.php @@ -20,6 +20,13 @@ * */ + +if (@is_readable(AmpConfig::get('prefix') . '/config/motd.php')) { + echo '
'; + require_once AmpConfig::get('prefix') . '/config/motd.php'; + echo '

'; +} + foreach (Plugin::get_plugins('display_home') as $plugin_name) { $plugin = new Plugin($plugin_name); if ($plugin->load($GLOBALS['user'])) { diff --git a/templates/show_live_stream.inc.php b/templates/show_live_stream.inc.php index 56d10205..7bb64c21 100644 --- a/templates/show_live_stream.inc.php +++ b/templates/show_live_stream.inc.php @@ -49,9 +49,9 @@ id,'add', T_('Add to temporary playlist'),'add_live_stream_' . $radio->id); ?> f_name; - $itemprops[gettext_noop('Website')] = $radio->f_link; - $itemprops[gettext_noop('Stream')] = $radio->f_url_link; + $itemprops[gettext_noop('Name')] = $radio->f_name; + $itemprops[gettext_noop('Website')] = scrub_out($radio->site_url); + $itemprops[gettext_noop('Stream')] = $radio->f_url_link; $itemprops[gettext_noop('Codec')] = scrub_out($video->codec); foreach ($itemprops as $key => $value) { diff --git a/templates/show_song.inc.php b/templates/show_song.inc.php index c57c7a8a..10b95009 100644 --- a/templates/show_song.inc.php +++ b/templates/show_song.inc.php @@ -244,12 +244,8 @@ $button_flip_state_id = 'button_flip_state_' . $song->id; $songprops[gettext_noop('Lyrics')] = $song->f_lyrics; } - if (AmpConfig::get('licensing')) { - if ($song->license) { - $license = new License($song->license); - $license->format(); - $songprops[gettext_noop('Licensing')] = $license->f_link; - } + if (AmpConfig::get('licensing') && $song->license) { + $songprops[gettext_noop('Licensing')] = $song->f_license; } $owner_id = $song->get_user_owner(); diff --git a/templates/show_song_row.inc.php b/templates/show_song_row.inc.php index fcb9be7d..0c32acd9 100644 --- a/templates/show_song_row.inc.php +++ b/templates/show_song_row.inc.php @@ -68,6 +68,12 @@ if ($libitem->enabled || Access::check('interface','50')) { f_album_link ?> f_tags ?> f_time ?> + +f_license ?> + diff --git a/templates/show_songs.inc.php b/templates/show_songs.inc.php index d7ea6cc5..ba8956e8 100644 --- a/templates/show_songs.inc.php +++ b/templates/show_songs.inc.php @@ -36,6 +36,12 @@ $thcount = 8; id . '&sort=album' . $argument_param, T_('Album'), 'sort_song_album' . $browse->id); ?> id . '&sort=time' . $argument_param, T_('Time'), 'sort_song_time' . $browse->id); ?> + + + id . '&sort=album' . $argument_param, T_('Album'), 'sort_song_album' . $browse->id); ?> id . '&sort=time' . $argument_param, T_('Time'), 'sort_song_time' . $browse->id); ?> + + +