[kaltura] Add fallback for fileExt
authorSergey M․ <dstftw@gmail.com>
Sat, 28 Jan 2017 11:27:42 +0000 (18:27 +0700)
committerSergey M․ <dstftw@gmail.com>
Sat, 28 Jan 2017 11:27:42 +0000 (18:27 +0700)
youtube_dl/extractor/kaltura.py

index a57d913aff67d47b665582ee1a6e9656f9453278..5ef382f9f730091c079ab5083e0ab87f4677c407 100644 (file)
@@ -266,9 +266,12 @@ class KalturaIE(InfoExtractor):
             # skip for now.
             if f.get('fileExt') == 'chun':
                 continue
-            if not f.get('fileExt') and f.get('containerFormat') == 'qt':
+            if not f.get('fileExt'):
                 # QT indicates QuickTime; some videos have broken fileExt
-                f['fileExt'] = 'mov'
+                if f.get('containerFormat') == 'qt':
+                    f['fileExt'] = 'mov'
+                else:
+                    f['fileExt'] = 'mp4'
             video_url = sign_url(
                 '%s/flavorId/%s' % (data_url, f['id']))
             # audio-only has no videoCodecId (e.g. kaltura:1926081:0_c03e1b5g