feat: Added Navidrome server side "song radio" queue support - #617
feat: Added Navidrome server side "song radio" queue support#617FormalSnake wants to merge 2 commits into
Conversation
📝 WalkthroughWalkthroughSubsonic now supports similar-song retrieval for radio playback. A shared converter maps songs to tracks with cover and album metadata. Playlist conversion reuses the converter. ChangesSubsonic radio support
Sequence Diagram(s)sequenceDiagram
participant SubsonicSource
participant SubsonicClient
participant SubsonicServer
participant TrackConverter
SubsonicSource->>SubsonicClient: request up to 50 similar songs
SubsonicClient->>SubsonicServer: call getSimilarSongs2.view
SubsonicServer-->>SubsonicClient: return similar-song response
SubsonicClient-->>SubsonicSource: return song vector
SubsonicSource->>TrackConverter: convert songs to tracks
TrackConverter-->>SubsonicSource: return tracks
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@crates/server/src/source/subsonic.rs`:
- Line 230: Update the Subsonic source setup surrounding the radio capability
assignment so radio is enabled only when the server is confirmed to support
getSimilarSongs2; otherwise set radio to false or leave it disabled. Ensure
start_radio is not advertised for servers lacking similar-song support.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: d60ec925-449b-47bd-b190-09fbb7da2118
📒 Files selected for processing (2)
crates/server/src/source/subsonic.rscrates/server/src/subsonic.rs
| downloads: true, | ||
| discover: false, | ||
| radio: false, | ||
| radio: true, |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟠 Major | 🏗️ Heavy lift
Do not advertise radio when the server cannot provide similar songs.
Line 230 enables radio for every Subsonic source. get_similar_songs documents that the endpoint needs a server-side plugin. Servers without that plugin will expose the radio action and then fail at start_radio.
Detect support during source setup, or keep radio disabled until configuration confirms that the server supports getSimilarSongs2.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@crates/server/src/source/subsonic.rs` at line 230, Update the Subsonic source
setup surrounding the radio capability assignment so radio is enabled only when
the server is confirmed to support getSimilarSongs2; otherwise set radio to
false or leave it disabled. Ensure start_radio is not advertised for servers
lacking similar-song support.
Added song radio support for navidrome servers that support it. For example, Audiomuse classifies songs with a ML and adds queue support, other clients support this and Kopuz did not.
AI has been used for some parts, it has been tested by hand
Sanity Checking
rules.
contribution guidelines, or this pull request did not use AI assistance.
Style and Consistency
style.
cargo fmt --all --checkorcargo fmt --allas appropriate.cargo clippy --workspace --all-targets -- -D warnings, orexplained why it could not be run.
this change depends on them.
Testing
Tested on platform(s):
x86_64-linuxaarch64-linuxx86_64-darwinaarch64-darwin