fix(favorites): show artist name in filter label, not Subsonic ID (#736)

Clicking a card under Top Artists by Favorites set the artist filter
to the artist's Subsonic ID, and the "Showing X of Y" label
interpolated that ID into the `{{artist}}` placeholder — so the user
saw a GUID like "OjdsOiMQ6ve5rZWPj2ePFc" instead of "Toto".

Look the name up from `topFavoriteArtists` (already on the page,
each entry carries `{id, name}`), and pass it to the header. The ID
filter itself is unchanged — the song-filtering hook still matches on
`artistId` / `artist` / `albumArtist`.

Reported by zunoz on Discord.
This commit is contained in:
Frank Stellmacher
2026-05-16 13:51:11 +02:00
committed by GitHub
parent 31abdc03ef
commit 1ac354fb67
2 changed files with 9 additions and 2 deletions
+6
View File
@@ -114,6 +114,11 @@ export default function Favorites() {
selectedArtist, selectedGenres, yearRange, ratings,
});
const selectedArtistName = useMemo(
() => selectedArtist ? topFavoriteArtists.find(a => a.id === selectedArtist)?.name ?? null : null,
[selectedArtist, topFavoriteArtists],
);
const { toggleSelect } = useFavoritesSelection(songs, inSelectMode, tracklistRef);
@@ -174,6 +179,7 @@ export default function Favorites() {
visibleSongs={visibleSongs}
songs={songs}
selectedArtist={selectedArtist}
selectedArtistName={selectedArtistName}
setSelectedArtist={setSelectedArtist}
selectedGenres={selectedGenres}
setSelectedGenres={setSelectedGenres}