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

[Subsonic] getArtistInfo doesn't work with song id #906

Closed
wiz78 opened this issue Oct 18, 2021 · 10 comments
Closed

[Subsonic] getArtistInfo doesn't work with song id #906

wiz78 opened this issue Oct 18, 2021 · 10 comments
Labels

Comments

@wiz78
Copy link

wiz78 commented Oct 18, 2021

Subsonic API docs specify that getArtistInfo can be called with "The artist, album or song ID.", but the Music app only handles the first two cases.

@dslengel
Copy link

Please let me now!
Thanks

@paulijar
Copy link
Collaborator

Actually, we don't currently handle the case of album IDs, either. I hadn't noticed that the API spec defines the argument like that, as the other similar method getArtistInfo2 is defined to support only artists IDs. Anyway, this shall be fixed for the next release.

Do you know any Subsonic client which would try to use getArtistInfo by supplying the ID of an album or a track?

@wiz78
Copy link
Author

wiz78 commented Oct 19, 2021

My own Soundwaves (https://apps.apple.com/app/soundwaves/id736139596) uses getArtistInfo with track ID, to show some details about the currently playing track, if the user requests them. It can't pass the artist ID since Subsonic doesn't provide it for tracks.

If you need a promo code to test it, just let me know and I'll email it to you.

@dslengel
Copy link

dslengel commented Oct 19, 2021

For example:
63594

Would your promo code solve this issue?
47020

@paulijar
Copy link
Collaborator

Okay, thanks for the info. I don't have any Apple devices to test with so that explains why I haven't seen any problem.

It can't pass the artist ID since Subsonic doesn't provide it for tracks.

Are you sure about that? At least the Subsonic demo server seems to include the property artistId on the child entries as can be seen e.g. in http://demo.subsonic.org/rest/getMusicDirectory.view?u=guest4&c=test&v=1.16&s=123&t=fcf41657f02f88137a1bcf068a32c0a3&f=xml&id=260

It should be noted, though, that this artistId cannot be passed to getArtistInfo, it works only with getArtistInfo2. According to http://www.subsonic.org/pages/inc/api/schema/subsonic-rest-api-1.16.1.xsd, this property has been added by the API v1.8.0 while getArtistInfo and getArtistInfo2 are not available before API v1.11.0.

@wiz78
Copy link
Author

wiz78 commented Oct 19, 2021

It should be noted, though, that this artistId cannot be passed to getArtistInfo, it works only with getArtistInfo2.

that bit was not quite clear to me from the docs. However getArtistInfo2 would require a different way to browse similar artists too, since the ids it returns cannot be passed back to getMusicDirectory, like those returned by getArtistInfo. I don't browse by ID3 tags anywhere else in the app (there are pros and cons in both kind of navigation, but using getMusicDirectory seems to be the most useful way so far)

paulijar added a commit that referenced this issue Oct 20, 2021
According to the Subsonic API documentation, it should
be possible to call `getArtistInfo` also with an ID pointing to an
album or a track. On the other hand, `getArtistInfo2` is not specified
to have such support, but we provide it anyway, because we use a shared
implementation for both of these functions (the real Subsonic server
couldn't do this because it doesn't use ID prefixes, making some of the
different ID types indistinguishable from each other).

Also, the the function now supports fetching the artist info with a
folder ID. This may be relevant when browsing the library by folders.
In this case, the info is fetched based on the folder name; if there is
an artist in the DB with the same name as the folder, then the info can
be fetched.

refs #906
@paulijar
Copy link
Collaborator

Okay, I see. The Subsonic API can be a bit awkward to use with its ID3/filetree duality. And the Music app's implementation of the API is yet another story because of the different starting point and somewhat different design philosophy.

But anyways, I have now made a fix for this. So when the next Music app release rolls out probably withing a couple of weeks, the getArtistInfo should work fine also with track and album IDs.

Thanks for reporting the issue!

@paulijar paulijar added the Bug label Oct 29, 2021
@paulijar
Copy link
Collaborator

Music v1.4.1 is now out, including also this fix/enhancement.

@erwinlagu
Copy link

is this already fixed?

@paulijar
Copy link
Collaborator

paulijar commented Jan 9, 2022

@erwinlagu Yes, as stated above: #906 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants