1
0
Fork 0
mirror of https://github.com/blackjack4494/yt-dlc.git synced 2024-12-23 00:07:49 +00:00

[orf:tvthek] Fix extraction (closes #17737)

use _extract_m3u8_formats and _extract_f4m_formats helper functions
closes #17737
This commit is contained in:
Sebastian Haas 2018-10-30 23:44:50 +01:00 committed by Sergey M․
parent 061ea3a776
commit c620694c97
No known key found for this signature in database
GPG key ID: 2C393E0F18A9236D

View file

@ -80,14 +80,16 @@ class ORFTVthekIE(InfoExtractor):
if not video_id or not title: if not video_id or not title:
continue continue
video_id = compat_str(video_id) video_id = compat_str(video_id)
formats = [{ formats = []
'preference': -10 if fd['delivery'] == 'hls' else None, for fd in sd['sources']:
'format_id': '%s-%s-%s' % ( format_id = '%s-%s-%s' % (
fd['delivery'], fd['quality'], fd['quality_string']), fd['delivery'], fd['quality'], fd['quality_string'])
'url': fd['src'], if determine_ext(fd['src']) == 'm3u8':
'protocol': fd['protocol'], formats.extend(self._extract_m3u8_formats(
'quality': quality_to_int(fd['quality']), fd['src'], video_id, 'mp4', m3u8_id=format_id))
} for fd in sd['sources']] elif determine_ext(fd['src']) == 'f4m':
formats.extend(self._extract_f4m_formats(
fd['src'], video_id, f4m_id=format_id))
# Check for geoblocking. # Check for geoblocking.
# There is a property is_geoprotection, but that's always false # There is a property is_geoprotection, but that's always false