0
0
Fork 0
mirror of https://github.com/yt-dlp/yt-dlp.git synced 2024-11-23 02:25:11 +00:00

[jwplatform] Improve duration extraction

This commit is contained in:
Sergey M․ 2016-12-17 18:45:53 +07:00
parent a495840d3b
commit 732d116aa7
No known key found for this signature in database
GPG key ID: 2C393E0F18A9236D

View file

@ -126,7 +126,7 @@ def _parse_jwplayer_data(self, jwplayer_data, video_id=None, require_title=True,
'description': video_data.get('description'),
'thumbnail': self._proto_relative_url(video_data.get('image')),
'timestamp': int_or_none(video_data.get('pubdate')),
'duration': float_or_none(jwplayer_data.get('duration')),
'duration': float_or_none(jwplayer_data.get('duration') or video_data.get('duration')),
'subtitles': subtitles,
'formats': formats,
})