1
0
mirror of https://github.com/yt-dlp/yt-dlp.git synced 2026-02-19 15:05:47 +00:00

Add --format-sort-reset option (#13809)

Authored by: nihil-admirari
This commit is contained in:
Nil Admirari
2026-01-19 20:40:08 +03:00
committed by GitHub
parent 0b08b833bf
commit b16b06378a
2 changed files with 6 additions and 0 deletions

View File

@@ -882,6 +882,10 @@ def create_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='Disregard previous user specified sort order and reset to the default')
video_format.add_option(
'--format-sort-force', '--S-force',
action='store_true', dest='format_sort_force', metavar='FORMAT', default=False,