mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2025-12-16 04:58:56 +00:00
[cleanup] Minor fixes
This commit is contained in:
@@ -1685,6 +1685,8 @@ class YoutubeDL:
|
||||
|
||||
def __process_playlist(self, ie_result, download):
|
||||
"""Process each entry in the playlist"""
|
||||
assert ie_result['_type'] in ('playlist', 'multi_video')
|
||||
|
||||
title = ie_result.get('title') or ie_result.get('id') or '<Untitled>'
|
||||
self.to_screen(f'[download] Downloading playlist: {title}')
|
||||
|
||||
@@ -3540,7 +3542,9 @@ class YoutubeDL:
|
||||
def simplified_codec(f, field):
|
||||
assert field in ('acodec', 'vcodec')
|
||||
codec = f.get(field, 'unknown')
|
||||
if codec != 'none':
|
||||
if not codec:
|
||||
return 'unknown'
|
||||
elif codec != 'none':
|
||||
return '.'.join(codec.split('.')[:4])
|
||||
|
||||
if field == 'vcodec' and f.get('acodec') == 'none':
|
||||
|
||||
@@ -450,8 +450,7 @@ class FileDownloader:
|
||||
raise NotImplementedError('This method must be implemented by subclasses')
|
||||
|
||||
def _hook_progress(self, status, info_dict):
|
||||
if not self._progress_hooks:
|
||||
return
|
||||
# Ideally we want to make a copy of the dict, but that is too slow
|
||||
status['info_dict'] = info_dict
|
||||
# youtube-dl passes the same status object to all the hooks.
|
||||
# Some third party scripts seems to be relying on this.
|
||||
|
||||
Reference in New Issue
Block a user