mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-17 15:25:49 +00:00
[senate] Simplify
There isn't any problem if the 'formats' field only has one element
This commit is contained in:
parent
757cda0a96
commit
5c1e6f69c4
@ -133,15 +133,9 @@ def _real_extract(self, url):
|
|||||||
|
|
||||||
self._sort_formats(formats)
|
self._sort_formats(formats)
|
||||||
|
|
||||||
info_dict = {
|
return {
|
||||||
'id': video_id,
|
'id': video_id,
|
||||||
'title': title,
|
'title': title,
|
||||||
|
'formats': formats,
|
||||||
'thumbnail': thumbnail,
|
'thumbnail': thumbnail,
|
||||||
}
|
}
|
||||||
|
|
||||||
if len(formats) >= 1:
|
|
||||||
info_dict.update({'formats': formats})
|
|
||||||
else:
|
|
||||||
info_dict.update(formats[0])
|
|
||||||
|
|
||||||
return info_dict
|
|
||||||
|
Loading…
Reference in New Issue
Block a user