mirror of
https://github.com/kilyabin/psysonic.git
synced 2026-07-22 06:25:41 +00:00
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:
committed by
GitHub
parent
31abdc03ef
commit
1ac354fb67
@@ -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}
|
||||
|
||||
Reference in New Issue
Block a user