Skip to content

add ratingID3 extension to support user ratings for AlbumID3 and ArtistID3#184

Open
dweymouth wants to merge 6 commits into
mainfrom
extension/ratingID3
Open

add ratingID3 extension to support user ratings for AlbumID3 and ArtistID3#184
dweymouth wants to merge 6 commits into
mainfrom
extension/ratingID3

Conversation

@dweymouth

@dweymouth dweymouth commented Nov 29, 2025

Copy link
Copy Markdown
Member

This extension allows setting user ratings to artists and albums in the ArtistID3/AlbumID3 system. The existing endpoint only supported rating artists and albums using the old folder-based IDs and organization, which isn't used by most modern clients.

@netlify

netlify Bot commented Nov 29, 2025

Copy link
Copy Markdown

Deploy Preview for opensubsonic ready!

Name Link
🔨 Latest commit 0aeffc8
🔍 Latest deploy log https://app.netlify.com/projects/opensubsonic/deploys/69304f4273953a00083805ac
😎 Deploy Preview https://deploy-preview-184--opensubsonic.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@Tolriq

Tolriq commented Nov 29, 2025

Copy link
Copy Markdown
Member

Need another naming concept. ID3 is the tag format.

But the current endpoint already says it supports ratings for albums and artists no?

So we just need new fields as optional and so no need for extension ?

@dweymouth

Copy link
Copy Markdown
Member Author

Need another naming concept. ID3 is the tag format.

But the current endpoint already says it supports ratings for albums and artists no?

So we just need new fields as optional and so no need for extension ?

We need the extension because the existing endpoint only supports IDs for Artist and Album, not ArtistID3 and AlbumID3. They are not interchangeable, and most modern servers/clients use the latter. See the structure of the star endpoint for which I was following the existing pattern.

@Tolriq

Tolriq commented Nov 29, 2025

Copy link
Copy Markdown
Member

Ok, still find the extension naming ultra confusing but the old API is confusing anyway :)

@dweymouth dweymouth changed the title add ratingID3 extension add ratingID3 extension to support user ratings for AlbumID3 and ArtistID3 Nov 29, 2025
@paulijar

Copy link
Copy Markdown
Member

On my own server implementation, I have distinct ID space for each different entity type (songs, albums, folders, playlists...) by having a type-specific prefix on each ID. I have been accepting different kinds of IDs on the id parameter of the setRating endpoint. And it seems that some clients actually use the endpoint like that, passing the IDs of AlbumID3 or ArtistID3 objects. But seeing that all these IDs are just plain numbers on the OG Subsonic, that's probably a wrong way to use the original API. Or does someone know, if the OG Subsonic has some mechanism to avoid ID collisions between different types?

@Tolriq

Tolriq commented Nov 29, 2025

Copy link
Copy Markdown
Member

Most servers have different ids without possible clash, but since the API was undefined some server have or had possible clashes. So now additions to OS should be explicit to what the ids refers to.

@dweymouth

Copy link
Copy Markdown
Member Author

Subsonic and its direct forks (e.g. airsonic-advanced) did not support ArtistID3 and AlbumID3 IDs for this endpoint. Some servers and clients accept the newer tag-based IDs here, but it needs to be made explicit so that clients and servers can know exactly what is supported (hence the need for this extension). This is following the pattern for accepting the id3-based IDs introduced by the OG API in star

Comment thread content/en/docs/Endpoints/setrating.md Outdated
Comment thread content/en/docs/Endpoints/setrating.md Outdated
Comment thread openapi/endpoints/setRating.json Outdated
Comment thread openapi/schemas/ArtistID3.json Outdated
categories:
- Media annotation
description: >
Sets the rating for a music file.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also this description should be extended. E.g. "Sets the rating for a music file, folder, album, or artist".

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

library item?

`http://your-server/rest/setRating` Since [1.6.0](../../subsonic-versions)

Sets the rating for a music file.
Sets the rating for a music file, folder, album, or artist.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change went to wrong place. Here it wouldn't have been necessary as the sentence below already covers the artist and album. Now there's unnecessary repetition. My previous comment was targeted to the summary in the header on the line 7 of this file.

Comment on lines +21 to +22
| `artistId` | No | **Yes** | | The ID of an artistID3 to rate. Multiple parameters allowed. Supported by servers implementing the ratingID3 extension. |
| `albumId` | No | **Yes** | | The ID of an albumID3 to rate. Multiple parameters allowed. Supported by servers implementing the ratingID3 extension. |

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the "Multiple parameters allowed" here on purpose? Unlike in the star and unstar endpoints, the original specification doesn't allow multiple target items in setRating. It might be a sensible extension to allow multiple targets also here but then we should apply this also to the id parameter.

@paulijar

paulijar commented Dec 3, 2025

Copy link
Copy Markdown
Member

Still regarding the naming of the extension, do you see it plausible that we would someday want to add rating for other kinds of items? Like podcast channels, radio streams, and/or playlists?

If yes, then it might make sense to give the extension a more generic name like "Extended rating" to accommodate those other types in the future version(s) of the extension. Of course we can do those also as a separate extension, but would it be better to bundle similar changes under various versions of one extension? I have no strong opinion either way.

@paulijar

Copy link
Copy Markdown
Member

Any plans on finalizing this PR?

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.

4 participants