use --check-formats for downloader, #90

This commit is contained in:
simon 2021-11-25 11:17:25 +07:00
parent b1783d6be3
commit e3f9bd98de
No known key found for this signature in database
GPG Key ID: 2C15AA5E89985DD4
2 changed files with 2 additions and 1 deletions

View File

@ -22,7 +22,7 @@ Settings related to the download process.
## Download Format ## Download Format
Additional settings passed to yt-dlp. Additional settings passed to yt-dlp.
- **Format**: This controls which streams get downloaded and is equivalent to passing `--format` to yt-dlp. Use one of the recommended one or look at the documentation of [yt-dlp](https://github.com/yt-dlp/yt-dlp#format-selection). Please note: The option `--merge-output-format mp4` is automatically passed to yt-dlp to guarantee browser compatibility. - **Format**: This controls which streams get downloaded and is equivalent to passing `--format` to yt-dlp. Use one of the recommended one or look at the documentation of [yt-dlp](https://github.com/yt-dlp/yt-dlp#format-selection). Please note: The option `--merge-output-format mp4` is automatically passed to yt-dlp to guarantee browser compatibility. Similar to that, `--check-formats` is passed as well to check that the selected formats are actually downloadable.
- **Embed Metadata**: This saves the available tags directly into the media file by passing `--embed-metadata` to yt-dlp. - **Embed Metadata**: This saves the available tags directly into the media file by passing `--embed-metadata` to yt-dlp.
- **Embed Thumbnail**: This will save the thumbnail into the media file by passing `--embed-thumbnail` to yt-dlp. - **Embed Thumbnail**: This will save the thumbnail into the media file by passing `--embed-thumbnail` to yt-dlp.

View File

@ -576,6 +576,7 @@ class VideoDownloader:
"retries": 3, "retries": 3,
"writethumbnail": False, "writethumbnail": False,
"noplaylist": True, "noplaylist": True,
"check_formats": True,
} }
if self.config["downloads"]["format"]: if self.config["downloads"]["format"]:
obs["format"] = self.config["downloads"]["format"] obs["format"] = self.config["downloads"]["format"]