mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-12-14 15:22:35 +00:00
Fix --list
options not implying -s
in some cases (#5296)
Authored by: bashonly, Grub4K
This commit is contained in:
parent
bd7e919a75
commit
e4221b700f
1 changed files with 8 additions and 2 deletions
|
@ -672,6 +672,13 @@ class YoutubeDL:
|
||||||
else:
|
else:
|
||||||
self.params['nooverwrites'] = not self.params['overwrites']
|
self.params['nooverwrites'] = not self.params['overwrites']
|
||||||
|
|
||||||
|
if self.params.get('simulate') is None and any((
|
||||||
|
self.params.get('list_thumbnails'),
|
||||||
|
self.params.get('listformats'),
|
||||||
|
self.params.get('listsubtitles'),
|
||||||
|
)):
|
||||||
|
self.params['simulate'] = 'list_only'
|
||||||
|
|
||||||
self.params.setdefault('forceprint', {})
|
self.params.setdefault('forceprint', {})
|
||||||
self.params.setdefault('print_to_file', {})
|
self.params.setdefault('print_to_file', {})
|
||||||
|
|
||||||
|
@ -2643,8 +2650,7 @@ class YoutubeDL:
|
||||||
# The pre-processors may have modified the formats
|
# The pre-processors may have modified the formats
|
||||||
formats = self._get_formats(info_dict)
|
formats = self._get_formats(info_dict)
|
||||||
|
|
||||||
list_only = self.params.get('simulate') is None and (
|
list_only = self.params.get('simulate') == 'list_only'
|
||||||
self.params.get('list_thumbnails') or self.params.get('listformats') or self.params.get('listsubtitles'))
|
|
||||||
interactive_format_selection = not list_only and self.format_selector == '-'
|
interactive_format_selection = not list_only and self.format_selector == '-'
|
||||||
if self.params.get('list_thumbnails'):
|
if self.params.get('list_thumbnails'):
|
||||||
self.list_thumbnails(info_dict)
|
self.list_thumbnails(info_dict)
|
||||||
|
|
Loading…
Reference in a new issue