Signed-off-by: NotAShelf <raf@notashelf.dev> Change-Id: Ia8426a63a50d07a6cec2b104951d58eb6a6a6964
119 lines
2.5 KiB
Markdown
Vendored
119 lines
2.5 KiB
Markdown
Vendored
# Subtitles
|
|
|
|
Media subtitle management
|
|
|
|
## Endpoints
|
|
|
|
### GET /api/v1/media/{id}/subtitles
|
|
|
|
**Authentication:** Required (Bearer JWT)
|
|
|
|
#### Parameters
|
|
|
|
| Name | In | Required | Description |
|
|
| ---- | ---- | -------- | ------------- |
|
|
| `id` | path | Yes | Media item ID |
|
|
|
|
#### Responses
|
|
|
|
| Status | Description |
|
|
| ------ | --------------------------------------- |
|
|
| 200 | Subtitles and available embedded tracks |
|
|
| 401 | Unauthorized |
|
|
| 404 | Not found |
|
|
|
|
---
|
|
|
|
### POST /api/v1/media/{id}/subtitles
|
|
|
|
**Authentication:** Required (Bearer JWT)
|
|
|
|
#### Parameters
|
|
|
|
| Name | In | Required | Description |
|
|
| ---- | ---- | -------- | ------------- |
|
|
| `id` | path | Yes | Media item ID |
|
|
|
|
#### Request Body
|
|
|
|
`Content-Type: application/json`
|
|
|
|
See `docs/api/openapi.json` for the full schema.
|
|
|
|
#### Responses
|
|
|
|
| Status | Description |
|
|
| ------ | --------------------- |
|
|
| 200 | Subtitle added |
|
|
| 400 | Bad request |
|
|
| 401 | Unauthorized |
|
|
| 500 | Internal server error |
|
|
|
|
---
|
|
|
|
### GET /api/v1/media/{media_id}/subtitles/{subtitle_id}/content
|
|
|
|
**Authentication:** Required (Bearer JWT)
|
|
|
|
#### Parameters
|
|
|
|
| Name | In | Required | Description |
|
|
| ------------- | ---- | -------- | ------------- |
|
|
| `media_id` | path | Yes | Media item ID |
|
|
| `subtitle_id` | path | Yes | Subtitle ID |
|
|
|
|
#### Responses
|
|
|
|
| Status | Description |
|
|
| ------ | ---------------- |
|
|
| 200 | Subtitle content |
|
|
| 401 | Unauthorized |
|
|
| 404 | Not found |
|
|
|
|
---
|
|
|
|
### DELETE /api/v1/subtitles/{id}
|
|
|
|
**Authentication:** Required (Bearer JWT)
|
|
|
|
#### Parameters
|
|
|
|
| Name | In | Required | Description |
|
|
| ---- | ---- | -------- | ----------- |
|
|
| `id` | path | Yes | Subtitle ID |
|
|
|
|
#### Responses
|
|
|
|
| Status | Description |
|
|
| ------ | ---------------- |
|
|
| 200 | Subtitle deleted |
|
|
| 401 | Unauthorized |
|
|
| 404 | Not found |
|
|
|
|
---
|
|
|
|
### PATCH /api/v1/subtitles/{id}/offset
|
|
|
|
**Authentication:** Required (Bearer JWT)
|
|
|
|
#### Parameters
|
|
|
|
| Name | In | Required | Description |
|
|
| ---- | ---- | -------- | ----------- |
|
|
| `id` | path | Yes | Subtitle ID |
|
|
|
|
#### Request Body
|
|
|
|
`Content-Type: application/json`
|
|
|
|
See `docs/api/openapi.json` for the full schema.
|
|
|
|
#### Responses
|
|
|
|
| Status | Description |
|
|
| ------ | -------------- |
|
|
| 200 | Offset updated |
|
|
| 401 | Unauthorized |
|
|
| 404 | Not found |
|
|
|
|
---
|