get_http_album_query_ids('object_id'), 'play', T_('Play'), 'directplay_full_' . $c_album->id);
+ if (Stream_Playlist::check_autoplay_append()) {
+ echo Ajax::button('?page=stream&action=directplay&object_type=album&' . $c_album->get_http_album_query_ids('object_id') . '&append=true', 'play_add', T_('Play last'), 'addplay_album_' . $c_album->id);
+ }
}
- if (Stream_Playlist::check_autoplay_append()) {
- echo Ajax::button('?page=stream&action=directplay&object_type=album&' . $c_album->get_http_album_query_ids('object_id') . '&append=true', 'play_add', T_('Play last'), 'addplay_album_' . $c_album->id);
+ if ($show_playlist_add) {
+ echo Ajax::button('?action=basket&type=album&' . $c_album->get_http_album_query_ids('id'), 'add', T_('Add to temporary playlist'), 'play_full_' . $c_album->id);
+ echo Ajax::button('?action=basket&type=album_random&' . $c_album->get_http_album_query_ids('id'), 'random', T_('Random to temporary playlist'), 'play_random_' . $c_album->id);
}
- echo Ajax::button('?action=basket&type=album&' . $c_album->get_http_album_query_ids('id'), 'add', T_('Add to temporary playlist'), 'play_full_' . $c_album->id);
- echo Ajax::button('?action=basket&type=album_random&' . $c_album->get_http_album_query_ids('id'), 'random', T_('Random to temporary playlist'), 'play_random_' . $c_album->id);
?>
diff --git a/templates/show_album_row.inc.php b/templates/show_album_row.inc.php
index b44b8023..4b68c8ef 100644
--- a/templates/show_album_row.inc.php
+++ b/templates/show_album_row.inc.php
@@ -23,7 +23,7 @@
-
+
get_http_album_query_ids('object_id'), 'play', T_('Play'), 'play_album_' . $libitem->id); ?>
get_http_album_query_ids('object_id') . '&append=true', 'play_add', T_('Play last'), 'addplay_album_' . $libitem->id); ?>
@@ -44,11 +44,13 @@ if (Art::is_enabled()) {
f_name_link; ?> |
- get_http_album_query_ids('id'), 'add', T_('Add to temporary playlist'), 'add_album_' . $libitem->id); ?>
- get_http_album_query_ids('id'), 'random', T_('Random to temporary playlist'), 'random_album_' . $libitem->id); ?>
-
-
-
+
+ get_http_album_query_ids('id'), 'add', T_('Add to temporary playlist'), 'add_album_' . $libitem->id); ?>
+ get_http_album_query_ids('id'), 'random', T_('Random to temporary playlist'), 'random_album_' . $libitem->id); ?>
+
+
+
+
|
f_album_artist_link) ? $libitem->f_album_artist_link : $libitem->f_artist_link); ?> |
diff --git a/templates/show_albums.inc.php b/templates/show_albums.inc.php
index 2ffb645a..bdf14e77 100644
--- a/templates/show_albums.inc.php
+++ b/templates/show_albums.inc.php
@@ -51,16 +51,27 @@ $thcount = 8;
if (AmpConfig::get('ratings')) { Rating::build_cache('album',$object_ids); }
if (AmpConfig::get('userflags')) { Userflag::build_cache('album',$object_ids); }
+ $show_direct_play_cfg = AmpConfig::get('directplay');
+ $directplay_limit = AmpConfig::get('direct_play_limit');
+
/* Foreach through the albums */
foreach ($object_ids as $album_id) {
$libitem = new Album($album_id);
$libitem->allow_group_disks = $allow_group_disks;
$libitem->format();
+ $show_direct_play = $show_direct_play_cfg;
+ $show_playlist_add = true;
+ if ($directplay_limit > 0) {
+ $show_playlist_add = ($libitem->song_count <= $directplay_limit);
+ if ($show_direct_play) {
+ $show_direct_play = $show_playlist_add;
+ }
+ }
?>
-
+
|
diff --git a/templates/show_artist.inc.php b/templates/show_artist.inc.php
index 49fc4b9b..18736c69 100644
--- a/templates/show_artist.inc.php
+++ b/templates/show_artist.inc.php
@@ -21,6 +21,16 @@
*/
$web_path = AmpConfig::get('web_path');
+$show_direct_play = AmpConfig::get('directplay');
+$show_playlist_add = true;
+$directplay_limit = AmpConfig::get('direct_play_limit');
+
+if ($directplay_limit > 0) {
+ $show_playlist_add = ($artist->songs <= $directplay_limit);
+ if ($show_direct_play) {
+ $show_direct_play = $show_playlist_add;
+ }
+}
?>
f_name, 'info-box');
@@ -78,18 +88,19 @@ if (AmpConfig::get('show_played_times')) {
-
+
id,'play', T_('Play all'),'directplay_full_' . $artist->id); ?>
id, T_('Play all'),'directplay_full_text_' . $artist->id); ?>
-
-
+
id . '&append=true','play_add', T_('Play all last'),'addplay_artist_' . $artist->id); ?>
id . '&append=true', T_('Play all last'),'addplay_artist_text_' . $artist->id); ?>
+
+
id,'add', T_('Add all to temporary playlist'),'add_' . $artist->id); ?>
@@ -100,6 +111,7 @@ if (AmpConfig::get('show_played_times')) {
id,'random', T_('Random all to temporary playlist'),'random_' . $artist->id); ?>
id, T_('Random all to temporary playlist'),'random_text_' . $artist->id); ?>
+
|