[player/jsonapi/db] Add interface to get and set an output format

This commit is contained in:
ejurgensen
2024-01-07 00:00:18 +01:00
parent c079df5da7
commit 9f719ca155
8 changed files with 134 additions and 13 deletions

View File

@@ -341,6 +341,7 @@ GET /api/outputs
| requires_auth | boolean | `true` if output requires authentication |
| needs_auth_key | boolean | `true` if output requires an authorization key (device verification) |
| volume | integer | Volume in percent (0 - 100) |
| format | string | Stream format |
**Example**
@@ -359,7 +360,8 @@ curl -X GET "http://localhost:3689/api/outputs"
"has_password": false,
"requires_auth": false,
"needs_auth_key": false,
"volume": 0
"volume": 0,
"format": "alac"
},
{
"id": "0",
@@ -369,7 +371,8 @@ curl -X GET "http://localhost:3689/api/outputs"
"has_password": false,
"requires_auth": false,
"needs_auth_key": false,
"volume": 19
"volume": 19,
"format": "pcm"
},
{
"id": "100",
@@ -379,7 +382,8 @@ curl -X GET "http://localhost:3689/api/outputs"
"has_password": false,
"requires_auth": false,
"needs_auth_key": false,
"volume": 0
"volume": 0,
"format": "pcm"
}
]
}
@@ -448,6 +452,7 @@ curl -X GET "http://localhost:3689/api/outputs/0"
"requires_auth": false,
"needs_auth_key": false,
"volume": 3
"format": "pcm",
}
```
@@ -474,6 +479,7 @@ PUT /api/outputs/{id}
| selected | boolean | *(Optional)* `true` to enable and `false` to disable the output |
| volume | integer | *(Optional)* Volume in percent (0 - 100) |
| pin | string | *(Optional)* PIN for device verification |
| format | string | *(Optional)* Stream format |
**Response**