Skip to content

Commit

Permalink
Merge branch 'public/9.0' into public/9.1
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelherger committed Jan 10, 2025
2 parents acd4db6 + d393a7c commit 8ab3e5f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Slim/Control/Queries.pm
Original file line number Diff line number Diff line change
Expand Up @@ -640,7 +640,7 @@ sub albumsQuery {
my $col = '(SELECT COUNT(1) FROM (SELECT 1 FROM tracks WHERE tracks.album=albums.id GROUP BY work,grouping,performance))';
$c->{$col} = 1;
$as->{$col} = 'group_count';
$col = "(SELECT GROUP_CONCAT(SUBSTR('00000'||tracknum,-5) || COALESCE(work,'') || '##' || COALESCE(performance,'') || '##' || COALESCE(grouping,''),',,') FROM tracks WHERE tracks.album = albums.id)";
$col = "(SELECT GROUP_CONCAT(COALESCE(SUBSTR('00000'||disc,-5),'00001') || SUBSTR('00000'||tracknum,-5) || COALESCE(work,'') || '##' || COALESCE(performance,'') || '##' || COALESCE(grouping,''),',,') FROM tracks WHERE tracks.album = albums.id)";
$c->{$col} = 1;
$as->{$col} = 'group_structure';
}
Expand Down Expand Up @@ -845,7 +845,7 @@ sub albumsQuery {
my $previousGroup;
my $groupSeen = {};
foreach ( sort split(',,', $c->{'group_structure'}) ) {
my $thisTrackGroup = substr($_, 5);
my $thisTrackGroup = substr($_, 10);
if ( $previousGroup ne $thisTrackGroup ) {
if ( $nonContiguous = $groupSeen->{$thisTrackGroup} && $thisTrackGroup ne '####' ) {
last;
Expand Down

0 comments on commit 8ab3e5f

Please sign in to comment.