From 7a4466abd4f029272658fd8629b022e5e6aa4043 Mon Sep 17 00:00:00 2001 From: Jake Angerman Date: Mon, 14 Oct 2024 20:11:58 -0400 Subject: [PATCH 1/2] allow Squeezeplay to display the date in parentheses next to the album in Now Playing --- Slim/Control/Queries.pm | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Slim/Control/Queries.pm b/Slim/Control/Queries.pm index 8218504191..37af756894 100644 --- a/Slim/Control/Queries.pm +++ b/Slim/Control/Queries.pm @@ -3981,7 +3981,7 @@ sub statusQuery { if ( $menuMode ) { # Set required tags for menuMode - $tags = 'aAlKNcxJ'; + $tags = 'aAlKNcxJy'; } # DD - total playtime for the current playlist, nothing else returned elsif ( $tags =~ /DD/ ) { @@ -5105,7 +5105,7 @@ sub _addJivePlaylistControls { # ********************************************************************** # *** This is a performance-critical method *** -# Take cake to understand the performance implications of any changes. +# Take care to understand the performance implications of any changes. sub _addJiveSong { my $request = shift; # request @@ -5117,7 +5117,7 @@ sub _addJiveSong { my $songData = _songData( $request, $track, - 'aAlKNcxJ', # tags needed for our entities + 'aAlKNcxJy', # tags needed for our entities ); my $isRemote = $songData->{remote}; @@ -5128,6 +5128,7 @@ sub _addJiveSong { my $title = $text; my $album = $songData->{album}; my $artist = $songData->{artist}; + my $year = $songData->{year}; # Bug 15779, include other role data # XXX may want to include all contributor roles here? @@ -5189,7 +5190,8 @@ sub _addJiveSong { $request->addResultLoop($loop, $count, 'track', ''); } if ( defined($album) ) { - $request->addResultLoop($loop, $count, 'album', $album); + my $parenYear = defined($year) && $year > 0 ? " ($year)" : ''; + $request->addResultLoop($loop, $count, 'album', $album . $parenYear); } else { $request->addResultLoop($loop, $count, 'album', ''); } From 2a44ad17eb003a508a86661cb697998ba89d376c Mon Sep 17 00:00:00 2001 From: Jake Angerman Date: Sun, 27 Jul 2025 22:39:28 -0400 Subject: [PATCH 2/2] check showYear pref before appending date to album --- Slim/Control/Queries.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Slim/Control/Queries.pm b/Slim/Control/Queries.pm index 37af756894..98ec54c2b9 100644 --- a/Slim/Control/Queries.pm +++ b/Slim/Control/Queries.pm @@ -5190,7 +5190,7 @@ sub _addJiveSong { $request->addResultLoop($loop, $count, 'track', ''); } if ( defined($album) ) { - my $parenYear = defined($year) && $year > 0 ? " ($year)" : ''; + my $parenYear = $prefs->get('showYear') && defined($year) && $year > 0 ? " ($year)" : ''; $request->addResultLoop($loop, $count, 'album', $album . $parenYear); } else { $request->addResultLoop($loop, $count, 'album', '');