Adds playback preferences and auto-persisted playback state to user settings

This commit is contained in:
BinaryAlley committed 2026-10-15 21:09:38 +03:00
1 parent aab36dcd29
commit dd76309ded
81 files changed
+6102 -173

No files matched your search

+1 -1
View File
@@ -87,6 +87,6 @@ Wherever Lumina needs a folder or a file from the server, it opens the file syst
The tools section holds your settings and the language picker.
Your **settings** decide how lists and books behave for you. Enable pagination and the number of items per page control how browsing is split. The alpha picker option decides whether titles beginning with "The" are filed under the next word. Theme caching decides whether the theme is fetched fresh each time. Rendering PDFs as images and preserving book styles shape how books are shown, and the metadata and artwork aggregation options decide whether missing fields are completed from your other providers. The ones that touch libraries are described in more detail in [Managing Libraries](../managing-libraries/index.md).
Your **settings** decide how lists and books behave for you. Enable pagination and the number of items per page control how browsing is split. The alpha picker option decides whether titles beginning with "The" are filed under the next word. Theme caching decides whether the theme is fetched fresh each time. Rendering PDFs as images and preserving book styles shape how books are shown, and the metadata and artwork aggregation options decide whether missing fields are completed from your other providers. A final group of options shapes playback: whether the player keeps downloading while it is paused, whether it continues automatically at the end of an album or artist, whether consecutive tracks play without a gap, how ReplayGain normalizes loudness, and the quality cap used when the server has to normalize a track. The ones that touch libraries are described in more detail in [Managing Libraries](../managing-libraries/index.md).
The **language** picker switches the interface between the languages Lumina ships with, and remembers your choice.
@@ -8,6 +8,12 @@
- [Update User Settings](#update-user-settings)
- [Update User Settings Request](#update-user-settings-request)
- [Update User Settings Response](#update-user-settings-response)
- [Get Playback State](#get-playback-state)
- [Get Playback State Request](#get-playback-state-request)
- [Get Playback State Response](#get-playback-state-response)
- [Update Playback State](#update-playback-state)
- [Update Playback State Request](#update-playback-state-request)
- [Update Playback State Response](#update-playback-state-response)
## Settings
@@ -32,11 +38,16 @@ Returns the settings of the currently authenticated user.
"userId": "2cff0c0f-3a67-4e30-b94f-f4e948a3b64f",
"isPaginationEnabled": true,
"itemsPerPage": 50,
"ignoreThePrefixForAlphaPicker": true,
"shouldIgnoreThePrefixForAlphaPicker": true,
"isThemeCachingEnabled": true,
"shouldAggregateMetadataWhenMissing": true,
"shouldRenderPdfAsImages": false,
"shouldPreserveBookStyles": true
"shouldPreserveBookStyles": true,
"shouldKeepDownloadingWhilePaused": true,
"shouldAutoplay": true,
"isGaplessPlaybackEnabled": true,
"replayGainMode": "Off",
"streamingQuality": "Auto"
}
```
@@ -54,11 +65,16 @@ Updates the settings of the currently authenticated user.
{
"isPaginationEnabled": true,
"itemsPerPage": 50,
"ignoreThePrefixForAlphaPicker": true,
"shouldIgnoreThePrefixForAlphaPicker": true,
"isThemeCachingEnabled": true,
"shouldAggregateMetadataWhenMissing": true,
"shouldRenderPdfAsImages": false,
"shouldPreserveBookStyles": true
"shouldPreserveBookStyles": true,
"shouldKeepDownloadingWhilePaused": true,
"shouldAutoplay": true,
"isGaplessPlaybackEnabled": true,
"replayGainMode": "Off",
"streamingQuality": "Auto"
}
```
@@ -67,3 +83,49 @@ Updates the settings of the currently authenticated user.
```js
200 Ok
```
### Get Playback State
#### Get Playback State Request
```js
GET api/v1/users/me/settings/playback-state
```
Returns the playback state (the last volume and mute state) the player reported for the currently authenticated user. The values are written automatically by the player and are never surfaced as settings fields.
#### Get Playback State Response
```js
200 Ok
```
```json
{
"volume": 0.75,
"isMuted": false
}
```
### Update Playback State
#### Update Playback State Request
```js
PUT api/v1/users/me/settings/playback-state
```
Updates the playback state the player reported for the currently authenticated user. Both fields are required: the volume is a value between 0 and 1, and the mute state is a boolean. A request that omits either field, or sends a volume outside that range, is rejected with a `422 Unprocessable Entity`.
```json
{
"volume": 0.75,
"isMuted": false
}
```
#### Update Playback State Response
```js
200 Ok
```
@@ -0,0 +1,2 @@
GET {{host}}/api/v1/users/me/settings/playback-state
Authorization: Bearer {{ACCESS_TOKEN}}
@@ -0,0 +1,8 @@
PUT {{host}}/api/v1/users/me/settings/playback-state
Authorization: Bearer {{ACCESS_TOKEN}}
Content-Type: application/json
{
"volume": 0.75,
"isMuted": false
}
@@ -5,9 +5,14 @@ Content-Type: application/json
{
"isPaginationEnabled": true,
"itemsPerPage": 50,
"ignoreThePrefixForAlphaPicker": true,
"shouldIgnoreThePrefixForAlphaPicker": true,
"isThemeCachingEnabled": true,
"shouldAggregateMetadataWhenMissing": true,
"shouldRenderPdfAsImages": false,
"shouldPreserveBookStyles": true
"shouldPreserveBookStyles": true,
"shouldKeepDownloadingWhilePaused": true,
"shouldAutoplay": true,
"isGaplessPlaybackEnabled": true,
"replayGainMode": "Off",
"streamingQuality": "Auto"
}