]> gitweb @ CieloNegro.org - youtube-dl.git/commitdiff
[francetv] Fix duration extraction
authorSergey M․ <dstftw@gmail.com>
Sat, 18 Jul 2015 16:43:42 +0000 (22:43 +0600)
committerSergey M․ <dstftw@gmail.com>
Sat, 18 Jul 2015 16:43:42 +0000 (22:43 +0600)
youtube_dl/extractor/francetv.py

index 8274001720e297ce3591be332d5d72ab73e5f960..d4f98ca16dd2351c78e42b94f768c3ed944445d3 100644 (file)
@@ -87,7 +87,7 @@ class FranceTVBaseInfoExtractor(InfoExtractor):
             'title': info['titre'],
             'description': clean_html(info['synopsis']),
             'thumbnail': compat_urlparse.urljoin('http://pluzz.francetv.fr', info['image']),
-            'duration': float_or_none(info.get('real_duration'), 1000) or parse_duration(info['duree']),
+            'duration': int_or_none(info.get('real_duration')) or parse_duration(info['duree']),
             'timestamp': int_or_none(info['diffusion']['timestamp']),
             'formats': formats,
         }
@@ -250,6 +250,7 @@ class FranceTVIE(FranceTVBaseInfoExtractor):
                 'description': 'md5:',
                 'upload_date': '20150226',
                 'timestamp': 1424989860,
+                'duration': 5400,
             },
         },
         {