Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Album search results from Navidrome were not being added to the album column #45

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

xxxserxxx
Copy link

c.f. https://github.com/spezifisch/stmps/pull/40\#issuecomment-2361716375

The Subsonic API definition is sufficiently vague as to leave some implementation details to the servers, and Gonic and Navidrome implement search3 results slightly differently. What was causing the Navidrome issue is that Gonic includes the album name under both a Album and Name attributes, whereas Navidrome only provides the Name attribute. My code was, of course, matching on the (for Navidrome) empty Album attribute. Since Gonic provides both attributes, this patch compares the Name attribute in all instances.

This patch includes a couple of other related changes:

First, since search3 was introduced in the Subsonic API version 1.8.0, and Subsonic API servers require this version (although I expect most ignore it), I updated the SubsonicConnection.clientVersion from 1.0.0 to 1.8.0.

Second, the responses that include an artist always include an artistId attribute. Previously, the search code was comparing the artistName, not the artistId. We can debate which is more correct: it's conceivably possible for a server to have an artist under two different IDs, but matching by ID seems more correct, so this has been changed. I suspect more of this sort of change is scattered through the code, but I caught one place here.

Completely unrelated, SubsonicEntitys often include a cover art ID, which was not captured. I have a vague itch to someday use something like timg to show the cover art, maybe as part of the #25 "song info" ticket. I was in the struct making changes, and I snuck this in.

@xxxserxxx xxxserxxx mentioned this pull request Sep 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant