]> git.bitcoin.ninja Git - youtube-dl/commitdiff
[senate] Simplify
authorJaime Marquínez Ferrándiz <jaime.marquinez.ferrandiz@gmail.com>
Tue, 21 Apr 2015 13:04:55 +0000 (15:04 +0200)
committerJaime Marquínez Ferrándiz <jaime.marquinez.ferrandiz@gmail.com>
Tue, 21 Apr 2015 13:04:55 +0000 (15:04 +0200)
There isn't any problem if the 'formats' field only has one element

youtube_dl/extractor/senateisvp.py

index fa661026142842d8f8ffa0157302bfce77544455..d3b8a1be49702f71a1a8c4eb7bd01d17cf103071 100644 (file)
@@ -133,15 +133,9 @@ class SenateISVPIE(InfoExtractor):
 
             self._sort_formats(formats)
 
-        info_dict = {
+        return {
             'id': video_id,
             'title': title,
+            'formats': formats,
             'thumbnail': thumbnail,
         }
-
-        if len(formats) >= 1:
-            info_dict.update({'formats': formats})
-        else:
-            info_dict.update(formats[0])
-
-        return info_dict