fix: use request track count, better mix artist similar songs#9
Merged
NeptuneHub merged 1 commit intoNeptuneHub:mainfrom Feb 22, 2026
Merged
fix: use request track count, better mix artist similar songs#9NeptuneHub merged 1 commit intoNeptuneHub:mainfrom
NeptuneHub merged 1 commit intoNeptuneHub:mainfrom
Conversation
Author
|
Hey @NeptuneHub what do you think of this change ? :) |
NeptuneHub
requested changes
Feb 18, 2026
Owner
There was a problem hiding this comment.
Hi and thanks for your effort. I think that the community helps is the first best advantages of doing open source project so thanks for your contribution.
Going to the code, in some input configuration you introduce a divide by zero. Please fix it.
For the rest I agree that following the Navidrome parameter, when possible, is better than adding new one.
The plugin used a config value for the track count to return for GetSimilarSongsByTrack, and returned everything for GetSimilarSongsByArtist. This ignores the "count" parameter in the request, which indicates how many songs the player wants. This change makes use of this parameter and removes the plugin config value to be better match what navidrome expects, and have one less thing for users to configure / worry about. For GetSimilarSongsByTrack we simply use the parameter from the query and keep the same logic. For GetSimilarSongsByArtist, however, no limit was implemented. Before this change the plugin returned tracks in "clumps": a few tracks for artist1, a few tracks for artist2, etc. I changed the logic to instead alternate between the "base artist" (from the request) and related artists, stopping when we have the desired number of tracks. This IMHO better emulates the "radio" features of popular streaming services.
5453b7d to
5e90b07
Compare
NeptuneHub
approved these changes
Feb 22, 2026
Owner
|
Merged and Thank you for your contribution. |
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.
The plugin used a config value for the track count to return for GetSimilarSongsByTrack, and returned everything for GetSimilarSongsByArtist. This ignores the "count" parameter in the request, which indicates how many songs the player wants.
This change makes use of this parameter and removes the plugin config value to better match what navidrome expects, and have one less thing for users to configure / worry about.
For GetSimilarSongsByTrack we simply use the parameter from the query and keep the same logic.
For GetSimilarSongsByArtist, however, no limit was implemented. Before this change the plugin returned tracks in "clumps": a few tracks for artist1, a few tracks for artist2, etc. I changed the logic to instead alternate between the "base artist" (from the request) and related artists, stopping when we have the desired number of tracks. This IMHO better emulates the "radio" features of popular streaming services.