1
0
mirror of https://github.com/yt-dlp/yt-dlp.git synced 2025-08-14 00:18:31 +00:00

Add an option to reset the sort order to defaults (#13763)

This commit is contained in:
nihil-admirari 2025-07-22 14:34:15 +03:00
parent 035b1ece8f
commit 78d8620ae5
No known key found for this signature in database
GPG Key ID: 73FFE1A8C280F292

View File

@ -856,6 +856,10 @@ def _preset_alias_callback(option, opt_str, value, parser):
dest='format_sort', default=[], type='str', action='callback',
callback=_list_from_options_callback, callback_kwargs={'append': -1},
help='Sort the formats by the fields given, see "Sorting Formats" for more details')
video_format.add_option(
'--format-sort-reset',
dest='format_sort', action='store_const', const=[],
help='Resets format sort order to yt-dlp default')
video_format.add_option(
'--format-sort-force', '--S-force',
action='store_true', dest='format_sort_force', metavar='FORMAT', default=False,