Skip to content

Commit

Permalink
Only limit the contributor relation to the primary_artist when we are
Browse files Browse the repository at this point in the history
filtering based on track IDs.
  • Loading branch information
mherger committed Feb 20, 2015
1 parent 029d4be commit 506335f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Slim/Control/Queries.pm
Original file line number Diff line number Diff line change
Expand Up @@ -5390,7 +5390,8 @@ sub _getTagDataForTracks {
}

push @{$p}, map { Slim::Schema::Contributor->typeToRole($_) } @roles;
push @{$w}, 'contributors.id = tracks.primary_artist', 'contributor_track.role IN (' . join(', ', map {'?'} @roles) . ')';
push @{$w}, 'contributors.id = tracks.primary_artist' if $args->{trackIds};
push @{$w}, 'contributor_track.role IN (' . join(', ', map {'?'} @roles) . ')';
};

$tags =~ /s/ && do {
Expand Down

0 comments on commit 506335f

Please sign in to comment.