Made it possible to not use format in preset

This commit is contained in:
ArabCoders 2025-03-11 20:59:08 +03:00
parent 6b38c5fcd6
commit 608b0128b8
2 changed files with 6 additions and 3 deletions

View file

@ -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

View file

@ -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>