minor fixes to not export default format
This commit is contained in:
parent
fc696b6afa
commit
83152f0e00
3 changed files with 18 additions and 19 deletions
|
|
@ -129,7 +129,7 @@ class YTDLPOpts(metaclass=Singleton):
|
||||||
self.presets_opts = {}
|
self.presets_opts = {}
|
||||||
self._item_opts = {}
|
self._item_opts = {}
|
||||||
|
|
||||||
if "format" in data and "not_set" == data["format"]:
|
if "format" in data and data["format"] in ["not_set", "default"]:
|
||||||
data["format"] = None
|
data["format"] = None
|
||||||
|
|
||||||
return data
|
return data
|
||||||
|
|
|
||||||
|
|
@ -113,8 +113,7 @@
|
||||||
<span>The yt-dlp <code>[--format, -f]</code> video format code. see <NuxtLink
|
<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
|
href="https://github.com/yt-dlp/yt-dlp?tab=readme-ov-file#format-selection" target="blank">this
|
||||||
url</NuxtLink> for more info.</span>. Note, as this key is required, you can set the value to
|
url</NuxtLink> for more info.</span>. Note, as this key is required, you can set the value to
|
||||||
<code>not_set</code>
|
<code>default</code> to let <code>yt-dlp</code> choose the best format.
|
||||||
to use the default yt-dlp format.
|
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -386,8 +386,8 @@ const exportItem = async item => {
|
||||||
args[key] = preset.args[key]
|
args[key] = preset.args[key]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
const defaults = ['default', 'not_set']
|
||||||
if (preset.format !== 'not_set' && preset.format) {
|
if (preset.format && !defaults.includes(info.format)) {
|
||||||
args.format = preset.format
|
args.format = preset.format
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -421,7 +421,7 @@ const exportItem = async item => {
|
||||||
}
|
}
|
||||||
|
|
||||||
data['_type'] = 'task'
|
data['_type'] = 'task'
|
||||||
data['_version'] = '1.0'
|
data['_version'] = '1.1'
|
||||||
|
|
||||||
return copyText(base64UrlEncode(JSON.stringify(data)));
|
return copyText(base64UrlEncode(JSON.stringify(data)));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue