Made it possible to not use format in preset
This commit is contained in:
parent
6b38c5fcd6
commit
608b0128b8
2 changed files with 6 additions and 3 deletions
|
|
@ -82,8 +82,7 @@ class YTDLPOpts(metaclass=Singleton):
|
|||
|
||||
self._preset_opts["cookiefile"] = str(file)
|
||||
|
||||
if preset.format:
|
||||
self._preset_opts["format"] = preset.format
|
||||
self._preset_opts["format"] = preset.format
|
||||
|
||||
if preset.template:
|
||||
self._preset_opts["outtmpl"] = {"default": preset.template, "chapter": self._config.output_template_chapter}
|
||||
|
|
@ -129,4 +128,7 @@ class YTDLPOpts(metaclass=Singleton):
|
|||
self.presets_opts = {}
|
||||
self._item_opts = {}
|
||||
|
||||
if "format" in data and "not_set" == data["format"]:
|
||||
data["format"] = None
|
||||
|
||||
return data
|
||||
|
|
|
|||
|
|
@ -111,7 +111,8 @@
|
|||
<span class="icon"><i class="fa-solid fa-info" /></span>
|
||||
<span>The yt-dlp <code>[--format, -f]</code> video format code. see <NuxtLink
|
||||
href="https://github.com/yt-dlp/yt-dlp?tab=readme-ov-file#format-selection" target="blank">this
|
||||
url</NuxtLink> for more info.</span>
|
||||
url</NuxtLink> for more info.</span>. Note, as this key is required, you can set the value to <code>not_set</code>
|
||||
to use the default yt-dlp format.
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Reference in a new issue