1
0
mirror of https://github.com/yt-dlp/yt-dlp.git synced 2024-11-02 09:12:40 +01:00

Process videos when using --ignore-no-formats-error (#441)

Authored by: krichbanana
This commit is contained in:
Adrik 2021-06-23 17:11:02 -04:00 committed by pukkandan
parent 6033d9808d
commit 4513a41a72
No known key found for this signature in database
GPG Key ID: 0F00D95A001F4698

View File

@ -2190,6 +2190,8 @@ def is_wellformed(f):
raise ExtractorError('Requested format is not available', expected=True) raise ExtractorError('Requested format is not available', expected=True)
else: else:
self.report_warning('Requested format is not available') self.report_warning('Requested format is not available')
# Process what we can, even without any available formats.
self.process_info(dict(info_dict))
elif download: elif download:
self.to_screen( self.to_screen(
'[info] %s: Downloading %d format(s): %s' % ( '[info] %s: Downloading %d format(s): %s' % (
@ -2354,7 +2356,7 @@ def process_info(self, info_dict):
# TODO: backward compatibility, to be removed # TODO: backward compatibility, to be removed
info_dict['fulltitle'] = info_dict['title'] info_dict['fulltitle'] = info_dict['title']
if 'format' not in info_dict: if 'format' not in info_dict and 'ext' in info_dict:
info_dict['format'] = info_dict['ext'] info_dict['format'] = info_dict['ext']
if self._match_entry(info_dict) is not None: if self._match_entry(info_dict) is not None:
@ -2369,7 +2371,7 @@ def process_info(self, info_dict):
files_to_move = {} files_to_move = {}
# Forced printings # Forced printings
self.__forced_printings(info_dict, full_filename, incomplete=False) self.__forced_printings(info_dict, full_filename, incomplete=('format' not in info_dict))
if self.params.get('simulate', False): if self.params.get('simulate', False):
if self.params.get('force_write_download_archive', False): if self.params.get('force_write_download_archive', False):