[francetv] use m3u8 when f4m video isn't available

Fixes #5981
This commit is contained in:
Pierre-Louis Bonicoli 2015-06-15 13:31:23 +02:00
parent 6b3d3f0fbf
commit 8a567a2d6e

View File

@ -45,6 +45,7 @@ class FranceTVBaseInfoExtractor(InfoExtractor):
georestricted = False georestricted = False
formats = [] formats = []
fatal = len(info['videos']) == 1
for video in info['videos']: for video in info['videos']:
if video['statut'] != 'ONLINE': if video['statut'] != 'ONLINE':
continue continue
@ -63,9 +64,9 @@ class FranceTVBaseInfoExtractor(InfoExtractor):
'http://hdfauth.francetv.fr/esi/urltokengen2.html?url=%s' % video_url_parsed.path, 'http://hdfauth.francetv.fr/esi/urltokengen2.html?url=%s' % video_url_parsed.path,
video_id, 'Downloading f4m manifest token', fatal=False) video_id, 'Downloading f4m manifest token', fatal=False)
if f4m_url: if f4m_url:
formats.extend(self._extract_f4m_formats(f4m_url, video_id, 1, format_id)) formats.extend(self._extract_f4m_formats(f4m_url, video_id, 1, format_id, fatal))
elif ext == 'm3u8': elif ext == 'm3u8':
formats.extend(self._extract_m3u8_formats(video_url, video_id, 'mp4', m3u8_id=format_id)) formats.extend(self._extract_m3u8_formats(video_url, video_id, 'mp4', m3u8_id=format_id, fatal=fatal))
elif video_url.startswith('rtmp'): elif video_url.startswith('rtmp'):
formats.append({ formats.append({
'url': video_url, 'url': video_url,