Skip to content
Open
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions content/en/docs/Endpoints/setrating.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,15 @@ description: >

Sets the rating for a music file.

Servers implementing the [ratingID3 extension](../Extensions/ratingID3.md) additionally support setting ratings for ArtistID3 and AlbumID3.

### Parameters

| Parameter | Req. | OpenS. | Default | Comment |
| --- | --- | --- | --- | --- |
| `id` | **Yes** | | | A string which uniquely identifies the file (song) or folder (album/artist) to rate. |
Comment thread
paulijar marked this conversation as resolved.
Outdated
| `artistId` | No | **Yes** | | The ID of an artistID3 to star. Multiple parameters allowed. Supported by servers implementing the ratingID3 extension. |
| `albumId` | No | **Yes** | | The ID of an albumID3 to star. Multiple parameters allowed. Supported by servers implementing the ratingID3 extension. |
Comment thread
paulijar marked this conversation as resolved.
Outdated
| `rating` | **Yes** | | | The rating between 1 and 5 (inclusive), or 0 to remove the rating. |

### Example
Expand Down
19 changes: 19 additions & 0 deletions content/en/docs/Extensions/ratingID3.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
title: "Rating ID3"
linkTitle: "Rating ID3"
OpenSubsonic:
- Extension
description: >
Adds support for setting user ratings to ArtistID3 and AlbumID3 types.
---

**OpenSubsonic version**: [1](../../opensubsonic-versions)

**OpenSubsonic extension name**: `ratingID3` (As returned by [`getOpenSubsonicExtensions`](../../endpoints/getopensubsonicextensions))

## Version 1

Supporting this extension means that:

- The server supports the `userRating` field on [`AlbumID3`](../Responses/AlbumID3.md) and [`ArtistID3`](../Responses/ArtistID3.md)
- The [`setRating`](../Endpoints/setrating.md) endpoint supports the `albumId` and `artistId` parameters to apply user ratings to AlbumID3 and ArtistID3.
2 changes: 2 additions & 0 deletions content/en/docs/Responses/ArtistID3.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,15 @@ description: >
| `musicBrainzId` | `string` | No | **Yes** | The artist MusicBrainzID. |
| `sortName` | `string` | No | **Yes** | The artist sort name. |
| `roles` | Array of `string` | No | **Yes** | The list of all roles this artist has in the library. |
| `userRating` | `int` | No | **Yes** | The user rating of the artist. [1-5]|

{{< alert color="warning" title="OpenSubsonic" >}}
New fields are added:

- `musicBrainzId`
- `sortName`
- `roles`
- `userRating`

**Note**: All OpenSubsonic added fields are **optionals**. But if a server support a field it **must** return it with an empty / default value when not present in it's database so that clients knows what the server supports.

Expand Down
2 changes: 2 additions & 0 deletions content/en/docs/Responses/ArtistWithAlbumsID3.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,13 +94,15 @@ description: >
| `musicBrainzId` | `string` | No | **Yes** | The artist MusicBrainzID. |
| `sortName` | `string` | No | **Yes** | The artist sort name. |
| `roles` | Array of `string` | No | **Yes** | The list of all roles this artist has in the library. |
| `userRating` | `int` | No | **Yes** | The user rating of the artist. [1-5] |

{{< alert color="warning" title="OpenSubsonic" >}}
New fields are added:

- `musicBrainzId`
- `sortName`
- `roles`
- `userRating`

**Note**: All OpenSubsonic added fields are **optionals**. But if a server support a field it **must** return it with an empty / default value when not present in it's database so that clients knows what the server supports.

Expand Down
28 changes: 28 additions & 0 deletions openapi/endpoints/setRating.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,34 @@
"type": "string"
}
},
{
"name": "artistId",
"in": "query",
"description": "A string which uniquely identifies the artistID3 to rate. Supported by servers implementing the ratingID3 extension.",
"required": true,
Comment thread
paulijar marked this conversation as resolved.
Outdated
"schema": {
"type": "array",
"items": {
"type": "string"
}
},
"style": "form",
"explode": true
},
{
"name": "albumId",
"in": "query",
"description": "A string which uniquely identifies the albumID3 to rate. Supported by servers implementing the ratingID3 extension.",
"required": true,
"schema": {
"type": "array",
"items": {
"type": "string"
}
},
"style": "form",
"explode": true
},
{
"name": "rating",
"in": "query",
Expand Down
6 changes: 6 additions & 0 deletions openapi/schemas/ArtistID3.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,12 @@
"type": "string"
},
"description": "The list of all roles this artist has in the library."
},
"userRating": {
"type": "integer",
"minimum": 1,
"maximum": 5,
"description": "The user rating for this artist (0-5)."
Comment thread
paulijar marked this conversation as resolved.
Outdated
}
},
"required": [
Expand Down