mirror of
https://github.com/alexta69/metube.git
synced 2026-09-21 21:45:04 +00:00
Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 03f71fd257 | |||
| 210c607c53 | |||
| 381896901a | |||
| 4330d3b6c6 |
@@ -209,7 +209,7 @@ jobs:
|
|||||||
git push origin ":refs/tags/$TAG_NAME" || true
|
git push origin ":refs/tags/$TAG_NAME" || true
|
||||||
fi
|
fi
|
||||||
- name: Create GitHub Release
|
- name: Create GitHub Release
|
||||||
uses: softprops/action-gh-release@v2
|
uses: softprops/action-gh-release@v3
|
||||||
with:
|
with:
|
||||||
tag_name: ${{ steps.date.outputs.date }}
|
tag_name: ${{ steps.date.outputs.date }}
|
||||||
name: Release ${{ steps.date.outputs.date }}
|
name: Release ${{ steps.date.outputs.date }}
|
||||||
|
|||||||
@@ -106,9 +106,9 @@ When a download starts, these layers are combined in order. If the same option a
|
|||||||
|
|
||||||
### Option format
|
### Option format
|
||||||
|
|
||||||
yt-dlp options in MeTube are expressed as JSON objects. The keys are yt-dlp API option names, which roughly correspond to command-line flags with dashes replaced by underscores. For example, the command-line flag `--embed-thumbnail` becomes `"embed_thumbnail": true` in JSON.
|
yt-dlp options in MeTube are expressed as JSON objects. The keys are yt-dlp API option names, which roughly correspond to command-line flags with dashes replaced by underscores. For example, the command-line flag `--write-subs` becomes `"writesubtitles": true` in JSON.
|
||||||
|
|
||||||
> **Tip:** Some command-line flags don't have a direct single-key equivalent — for instance, `--recode-video` must be expressed via `"postprocessors"`. A full list of available API options can be found [in the yt-dlp source](https://github.com/yt-dlp/yt-dlp/blob/master/yt_dlp/YoutubeDL.py#L224), and [this conversion script](https://github.com/yt-dlp/yt-dlp/blob/master/devscripts/cli_to_api.py) can help translate command-line flags to their API equivalents.
|
> **Tip:** Some command-line flags don't have a direct single-key equivalent — for instance, `--embed-thumbnail` and `--recode-video` must be expressed via `"postprocessors"`. A full list of available API options can be found [in the yt-dlp source](https://github.com/yt-dlp/yt-dlp/blob/master/yt_dlp/YoutubeDL.py#L224), and [this conversion script](https://github.com/yt-dlp/yt-dlp/blob/master/devscripts/cli_to_api.py) can help translate command-line flags to their API equivalents.
|
||||||
|
|
||||||
### Global options
|
### Global options
|
||||||
|
|
||||||
@@ -118,7 +118,7 @@ Global options form the baseline for every download. There are two ways to defin
|
|||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
environment:
|
environment:
|
||||||
- 'YTDL_OPTIONS={"writesubtitles": true, "subtitleslangs": ["en", "de"], "updatetime": false, "embed_thumbnail": true}'
|
- 'YTDL_OPTIONS={"writesubtitles": true, "subtitleslangs": ["en", "de"], "updatetime": false, "writethumbnail": true}'
|
||||||
```
|
```
|
||||||
|
|
||||||
**Via a JSON file** (`YTDL_OPTIONS_FILE`) — mount a file into the container and point to it:
|
**Via a JSON file** (`YTDL_OPTIONS_FILE`) — mount a file into the container and point to it:
|
||||||
@@ -137,7 +137,7 @@ where `ytdl-options.json` contains:
|
|||||||
"writesubtitles": true,
|
"writesubtitles": true,
|
||||||
"subtitleslangs": ["en", "de"],
|
"subtitleslangs": ["en", "de"],
|
||||||
"updatetime": false,
|
"updatetime": false,
|
||||||
"embed_thumbnail": true
|
"writethumbnail": true
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -915,7 +915,7 @@ app.router.add_route('OPTIONS', config.URL_PREFIX + 'delete-cookies', add_cors)
|
|||||||
|
|
||||||
async def on_prepare(request, response):
|
async def on_prepare(request, response):
|
||||||
origin = request.headers.get('Origin')
|
origin = request.headers.get('Origin')
|
||||||
if origin and _cors_origins and origin in _cors_origins:
|
if origin and _cors_origins and ('*' in _cors_origins or origin in _cors_origins):
|
||||||
response.headers['Access-Control-Allow-Origin'] = origin
|
response.headers['Access-Control-Allow-Origin'] = origin
|
||||||
response.headers['Access-Control-Allow-Headers'] = 'Content-Type'
|
response.headers['Access-Control-Allow-Headers'] = 'Content-Type'
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,6 @@
|
|||||||
|
allowBuilds:
|
||||||
|
'@parcel/watcher': true
|
||||||
|
core-js: true
|
||||||
|
esbuild: true
|
||||||
|
lmdb: true
|
||||||
|
msgpackr-extract: true
|
||||||
Reference in New Issue
Block a user