feat: add artist radio using sonic similarity (#433) - #435
Open
luishidalgoa wants to merge 3 commits into
Open
Conversation
Adds a "Start radio" action to the artist options menu that builds a queue of sonically similar tracks via the OpenSubsonic getSonicSimilarTracks endpoint (sonicSimilarity extension). The radio is seeded from the artist's top song (falling back to their first available track), then the returned similar tracks are appended and de-duplicated. The action is only shown when the server advertises the sonicSimilarity extension, and shows a toast when no similar tracks are found. Closes victoralvesf#433 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
@luishidalgoa is attempting to deploy a commit to the Victor Alves' projects Team on Vercel. A member of the Team first needs to authorize it. |
Move the "radio" action out of the artist options (⋯) menu into a dedicated button in the artist header actions bar, next to shuffle, matching Navidrome's own artist page layout. The radio logic is extracted into a reusable useArtistRadio hook and the button (with a new Actions.RadioIcon) is only rendered when the server advertises the sonicSimilarity extension. i18n keys moved under artist.buttons.radio / artist.radio.empty. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The sonicSimilarity extension (getSonicSimilarTracks) is only advertised when a plugin like AudioMuse-AI is installed, so gating the radio button solely on it hid the feature on stock Navidrome servers. Navidrome's own artist radio uses the classic id3-based getSimilarSongs2 endpoint, which works without any plugin. Use it as the primary source (seeded directly by the artist id) and prefer getSonicSimilarTracks only when the sonicSimilarity extension is available. The button is now shown whenever the server is Navidrome or advertises sonicSimilarity. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Implements the artist radio functionality requested in #433. A dedicated Radio button is added to the artist header actions bar (next to shuffle), mirroring Navidrome's own artist page.
How
There are two flavours of "radio" in the Navidrome ecosystem, so this supports both:
getSimilarSongs2with the artist id. This is what Navidrome's own artist Radio uses (navidrome#4186) and works on any stock Navidrome server. Used as the primary source.getSonicSimilarTracksfrom thesonicSimilarityextension, which is only advertised when a plugin such as AudioMuse-AI is installed. Preferred when available (seeded from the artist's top song), falling back togetSimilarSongs2.The queue is de-duplicated and the artist is set as the playback source. If nothing is returned, a toast is shown instead of starting an empty queue.
The button is rendered when the server is Navidrome or advertises
sonicSimilarity(isRadioAvailable). All the logic lives in a reusableuseArtistRadiohook; the button uses a newActions.RadioIcon.Details
subsonic.songs.getSimilarSongs2andsubsonic.songs.getSonicSimilarTracks, with response types (SimilarSongsResponse,ISonicMatch/SonicSimilarTracksResponse) matching the documented shapes.sonicSimilarityEnabledtogetServerExtensions(mirrorssongLyrics).en,es,ptandpt-BR(artist.buttons.radio,artist.radio.empty); the rest fall back toen-USand can be filled via Weblate.Notes
Type-checking (
tsc) and Biome (incl. the repo pre-commit hook) are clean. The runtime paths (classicgetSimilarSongs2and the sonic fallback) still need a real-world check against a live server. Happy to tweak icon/wording/placement.Closes #433