fix(library): allow clicking Various Artists card in artist list
- Removed early return that blocked Various Artists clicks (album header already protected via HTML condition) - Added special case in selectedArtistAlbums: when user selects "Various Artists", show all albums with that artist name
This commit is contained in:
1 parent
e97a2ed86f
commit
5944099943
1 file changed
+10
-1
@@ -692,6 +692,14 @@
|
||||
if (!selectedArtistName) return [];
|
||||
const normalizedSelected = normalizeArtistName(selectedArtistName);
|
||||
|
||||
// Special case: when user selects "Various Artists" from the list,
|
||||
// show all albums where the album artist is "Various Artists"
|
||||
if (normalizedSelected === 'various artists') {
|
||||
return albums.filter(album =>
|
||||
normalizeArtistName(album.artist) === 'various artists'
|
||||
);
|
||||
}
|
||||
|
||||
// Split selected artist into parts for multi-artist matching
|
||||
// e.g., "Katsutoshi Kitagawa, Mina Kubota" -> ["katsutoshi kitagawa", "mina kubota"]
|
||||
const selectedParts = selectedArtistName.split(/,|&|feat\.|ft\.|featuring|with/i)
|
||||
@@ -2214,7 +2222,8 @@
|
||||
|
||||
async function handleLocalArtistClick(name?: string) {
|
||||
if (!name) return;
|
||||
if (normalizeArtistName(name) === 'various artists') return;
|
||||
// Note: "Various Artists" is allowed when clicking from artist list,
|
||||
// but blocked in album header via HTML condition
|
||||
|
||||
// Close album detail view if open and navigate to library
|
||||
if (selectedAlbum) {
|
||||
|
||||
Reference in new issue
Block a user