mirror of
https://gitlab.com/vyla-entertainment/documentation.git
synced 2026-11-16 15:37:23 -05:00
rewrite
This commit is contained in:
@@ -4,11 +4,35 @@
|
||||
|
||||
## Subtitle Endpoints
|
||||
|
||||
Retrieve subtitle tracks independently from video streams in `.vtt` or `.srt` formats.
|
||||
Retrieve subtitle tracks independently from video streams in `.vtt` or `.srt` formats. Both `/subtitles` and `/api/subtitles` paths are supported.
|
||||
|
||||
---
|
||||
|
||||
### 1. Movie Subtitles: `GET /subtitles/movie/:id`
|
||||
### Subtitle Directory: `GET /subtitles`
|
||||
|
||||
Returns available subtitle route templates:
|
||||
|
||||
```http
|
||||
GET /subtitles HTTP/1.1
|
||||
Host: api.vyla.cc
|
||||
```
|
||||
|
||||
```json
|
||||
{
|
||||
"routes": {
|
||||
"movie": "/subtitles/movie/:id",
|
||||
"tv": "/subtitles/tv/:id/:s/:e"
|
||||
},
|
||||
"examples": {
|
||||
"movie": "/subtitles/movie/155",
|
||||
"tv": "/subtitles/tv/1396/1/1"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
### Movie Subtitles: `GET /subtitles/movie/:id`
|
||||
|
||||
```http
|
||||
GET /subtitles/movie/155 HTTP/1.1
|
||||
@@ -23,27 +47,25 @@ curl https://api.vyla.cc/subtitles/movie/155
|
||||
```
|
||||
|
||||
```json
|
||||
{
|
||||
"subtitles": [
|
||||
{
|
||||
"label": "English",
|
||||
"file": "https://api.vyla.cc/api?url=https%3A%2F%2Fsubtitles.org%2Fen.vtt",
|
||||
"type": "vtt",
|
||||
"source": "opensubtitles"
|
||||
},
|
||||
{
|
||||
"label": "Spanish",
|
||||
"file": "https://api.vyla.cc/api?url=https%3A%2F%2Fsubtitles.org%2Fes.vtt",
|
||||
"type": "vtt",
|
||||
"source": "opensubtitles"
|
||||
}
|
||||
]
|
||||
}
|
||||
[
|
||||
{
|
||||
"label": "English",
|
||||
"file": "https://api.vyla.cc/api?url=https%3A%2F%2Fsubtitles.org%2Fen.vtt",
|
||||
"type": "vtt",
|
||||
"source": "opensubtitles"
|
||||
},
|
||||
{
|
||||
"label": "Spanish",
|
||||
"file": "https://api.vyla.cc/api?url=https%3A%2F%2Fsubtitles.org%2Fes.vtt",
|
||||
"type": "vtt",
|
||||
"source": "opensubtitles"
|
||||
}
|
||||
]
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
### 2. Television Episode Subtitles: `GET /subtitles/tv/:id/:season/:episode`
|
||||
### Television Episode Subtitles: `GET /subtitles/tv/:id/:season/:episode`
|
||||
|
||||
```http
|
||||
GET /subtitles/tv/1396/1/1 HTTP/1.1
|
||||
@@ -63,11 +85,33 @@ curl https://api.vyla.cc/subtitles/tv/1396/1/1
|
||||
|
||||
## Direct Download Endpoints
|
||||
|
||||
Fetch direct video files and torrent/debrid download packages.
|
||||
Fetch direct video files and stream packages for offline playback. Both `/downloads` and `/api/downloads` paths are supported.
|
||||
|
||||
---
|
||||
|
||||
### 1. Movie Downloads: `GET /downloads/movie/:id`
|
||||
### Download Directory: `GET /downloads`
|
||||
|
||||
```http
|
||||
GET /downloads HTTP/1.1
|
||||
Host: api.vyla.cc
|
||||
```
|
||||
|
||||
```json
|
||||
{
|
||||
"routes": {
|
||||
"movie": "/downloads/movie/:id",
|
||||
"tv": "/downloads/tv/:id/:s/:e"
|
||||
},
|
||||
"examples": {
|
||||
"movie": "/downloads/movie/155",
|
||||
"tv": "/downloads/tv/1396/1/1"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
### Movie Downloads: `GET /downloads/movie/:id`
|
||||
|
||||
```http
|
||||
GET /downloads/movie/155 HTTP/1.1
|
||||
@@ -75,29 +119,27 @@ Host: api.vyla.cc
|
||||
```
|
||||
|
||||
```json
|
||||
{
|
||||
"downloads": [
|
||||
{
|
||||
"quality": "1080p",
|
||||
"size": 2450882194,
|
||||
"type": "mkv",
|
||||
"active": true,
|
||||
"url": "https://cdn.example.com/download/the-dark-knight-1080p.mkv"
|
||||
},
|
||||
{
|
||||
"quality": "720p",
|
||||
"size": 1150428190,
|
||||
"type": "mkv",
|
||||
"active": true,
|
||||
"url": "https://cdn.example.com/download/the-dark-knight-720p.mkv"
|
||||
}
|
||||
]
|
||||
}
|
||||
[
|
||||
{
|
||||
"quality": "1080p",
|
||||
"size": 2450882194,
|
||||
"type": "mkv",
|
||||
"active": true,
|
||||
"url": "https://cdn.example.com/download/the-dark-knight-1080p.mkv"
|
||||
},
|
||||
{
|
||||
"quality": "720p",
|
||||
"size": 1150428190,
|
||||
"type": "mkv",
|
||||
"active": true,
|
||||
"url": "https://cdn.example.com/download/the-dark-knight-720p.mkv"
|
||||
}
|
||||
]
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
### 2. Television Episode Downloads: `GET /downloads/tv/:id/:season/:episode`
|
||||
### Television Episode Downloads: `GET /downloads/tv/:id/:season/:episode`
|
||||
|
||||
```http
|
||||
GET /downloads/tv/1396/1/1 HTTP/1.1
|
||||
@@ -105,17 +147,15 @@ Host: api.vyla.cc
|
||||
```
|
||||
|
||||
```json
|
||||
{
|
||||
"downloads": [
|
||||
{
|
||||
"quality": "1080p",
|
||||
"size": 1420882194,
|
||||
"type": "mkv",
|
||||
"active": true,
|
||||
"url": "https://cdn.example.com/download/breaking-bad-s01e01-1080p.mkv"
|
||||
}
|
||||
]
|
||||
}
|
||||
[
|
||||
{
|
||||
"quality": "1080p",
|
||||
"size": 1420882194,
|
||||
"type": "mkv",
|
||||
"active": true,
|
||||
"url": "https://cdn.example.com/download/breaking-bad-s01e01-1080p.mkv"
|
||||
}
|
||||
]
|
||||
```
|
||||
|
||||
---
|
||||
@@ -124,4 +164,3 @@ Host: api.vyla.cc
|
||||
|
||||
- **Non-blocking Loading**: Fetch subtitles in the background while video playback begins immediately on the first candidate stream.
|
||||
- **CORS Permissive**: Subtitle tracks proxied through `/api?url=...` include `Access-Control-Allow-Origin: *`, allowing HTML5 `<track>` elements to render in any browser context.
|
||||
- **Format Conversion**: If your web player requires WebVTT, convert SRT commas to dots (`00:01:20,500` -> `00:01:20.500`) client-side before loading.
|
||||
|
||||
Reference in New Issue
Block a user