Skip to content

Commit

Permalink
Include online artists without tracks in library views
Browse files Browse the repository at this point in the history
  • Loading branch information
mherger committed Mar 20, 2020
1 parent e3657bb commit 2b66a8a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Slim/Menu/BrowseLibrary.pm
Original file line number Diff line number Diff line change
Expand Up @@ -1086,7 +1086,7 @@ sub _artists {
}

# only get external artists without album if no filter is set
my $queryTags = (!scalar @searchTags || (scalar @searchTags == 1 && $searchTags[0] =~ /role_id:.*ALBUMARTIST/)) ? 'EQs' : 's';
my $queryTags = (!scalar grep { $_ !~ /^role_id:.*ALBUMARTIST|^library_id:/} @searchTags) ? 'EQs' : 's';

_generic($client, $callback, $args, 'artists',
[@searchTags, ($search ? 'search:' . $search : undef)],
Expand Down
7 changes: 4 additions & 3 deletions Slim/Music/VirtualLibraries.pm
Original file line number Diff line number Diff line change
Expand Up @@ -352,13 +352,14 @@ sub rebuild {

my $contributors_sth = $dbh->prepare_cached(qq{
INSERT OR IGNORE INTO library_contributor (library, contributor)
SELECT DISTINCT ?, contributor_track.contributor
FROM contributor_track
SELECT DISTINCT ?, contributors.id
FROM contributors
LEFT JOIN contributor_track ON contributor_track.contributor = contributors.id
WHERE contributor_track.track IN (
SELECT library_track.track
FROM library_track
WHERE library_track.library = ?
)
) OR (contributors.extid IS NOT NULL AND contributors.extid != '')
});
$contributors_sth->execute($id, $id);

Expand Down

0 comments on commit 2b66a8a

Please sign in to comment.