ソースを参照

[kaltura] Add fallback for fileExt

Sergey M․ 8 年 前
コミット
ab6f6aee78
1 ファイル変更5 行追加2 行削除
  1. 5 2
      youtube_dl/extractor/kaltura.py

+ 5 - 2
youtube_dl/extractor/kaltura.py

@@ -266,9 +266,12 @@ class KalturaIE(InfoExtractor):
             # skip for now.
             # skip for now.
             if f.get('fileExt') == 'chun':
             if f.get('fileExt') == 'chun':
                 continue
                 continue
-            if not f.get('fileExt') and f.get('containerFormat') == 'qt':
+            if not f.get('fileExt'):
                 # QT indicates QuickTime; some videos have broken 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(
             video_url = sign_url(
                 '%s/flavorId/%s' % (data_url, f['id']))
                 '%s/flavorId/%s' % (data_url, f['id']))
             # audio-only has no videoCodecId (e.g. kaltura:1926081:0_c03e1b5g
             # audio-only has no videoCodecId (e.g. kaltura:1926081:0_c03e1b5g