diff options
author | pukkandan <pukkandan.ytdlp@gmail.com> | 2022-07-11 01:17:48 +0530 |
---|---|---|
committer | pukkandan <pukkandan.ytdlp@gmail.com> | 2022-07-11 02:24:36 +0530 |
commit | f5ea47488a2c59b2520b4988b7eab4d8830e3077 (patch) | |
tree | 2dd8200f282ea57b1324d3d1baf5f35d9977d1f8 /yt_dlp/YoutubeDL.py | |
parent | 134c913cca8e526a0128c62741689c0d0d05df03 (diff) | |
download | hypervideo-pre-f5ea47488a2c59b2520b4988b7eab4d8830e3077.tar.lz hypervideo-pre-f5ea47488a2c59b2520b4988b7eab4d8830e3077.tar.xz hypervideo-pre-f5ea47488a2c59b2520b4988b7eab4d8830e3077.zip |
[cleanup] Minor fixes
Diffstat (limited to 'yt_dlp/YoutubeDL.py')
-rw-r--r-- | yt_dlp/YoutubeDL.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/yt_dlp/YoutubeDL.py b/yt_dlp/YoutubeDL.py index 7e9c0949b..e812f4775 100644 --- a/yt_dlp/YoutubeDL.py +++ b/yt_dlp/YoutubeDL.py @@ -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': |