mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-12-02 14:01:47 -05:00
[vlive] Extract thumbnail directly in addition to the one from Naver
Closes #477
This commit is contained in:
parent
501dd1ad55
commit
f0ff9979c6
1 changed files with 7 additions and 1 deletions
|
@ -178,9 +178,15 @@ def get_common_fields():
|
||||||
if video_type == 'VOD':
|
if video_type == 'VOD':
|
||||||
inkey = self._call_api('video/v1.0/vod/%s/inkey', video_id)['inkey']
|
inkey = self._call_api('video/v1.0/vod/%s/inkey', video_id)['inkey']
|
||||||
vod_id = video['vodId']
|
vod_id = video['vodId']
|
||||||
return merge_dicts(
|
info_dict = merge_dicts(
|
||||||
get_common_fields(),
|
get_common_fields(),
|
||||||
self._extract_video_info(video_id, vod_id, inkey))
|
self._extract_video_info(video_id, vod_id, inkey))
|
||||||
|
thumbnail = video.get('thumb')
|
||||||
|
if thumbnail:
|
||||||
|
if not info_dict.get('thumbnails') and info_dict.get('thumbnail'):
|
||||||
|
info_dict['thumbnails'] = [{'url': info_dict.pop('thumbnail')}]
|
||||||
|
info_dict.setdefault('thumbnails', []).append({'url': thumbnail, 'preference': 1})
|
||||||
|
return info_dict
|
||||||
elif video_type == 'LIVE':
|
elif video_type == 'LIVE':
|
||||||
status = video.get('status')
|
status = video.get('status')
|
||||||
if status == 'ON_AIR':
|
if status == 'ON_AIR':
|
||||||
|
|
Loading…
Reference in a new issue