Added ability to download worst quality video file only. (Closes #113)
authorKegan <kegan@kegan.info>
Sat, 23 Apr 2011 06:56:06 +0000 (14:56 +0800)
committerPhilipp Hagemeister <phihag@phihag.de>
Thu, 15 Sep 2011 10:14:16 +0000 (12:14 +0200)
youtube-dl

index c41228c93b7e313a82e1aaacec59eab9e98b5bf9..2fc88b0e8ff7fabc14ad6bbab4848891d7b6ffd3 100755 (executable)
@@ -1320,6 +1320,8 @@ class YoutubeIE(InfoExtractor):
                                return
                        if req_format is None:
                                video_url_list = [(existing_formats[0], url_map[existing_formats[0]])] # Best quality
+                       elif req_format == 'worst':
+                               video_url_list = [(existing_formats[len(existing_formats)-1], url_map[existing_formats[len(existing_formats)-1]])] # worst quality
                        elif req_format == '-1':
                                video_url_list = [(f, url_map[f]) for f in existing_formats] # All formats
                        else:
@@ -2832,6 +2834,8 @@ class FacebookIE(InfoExtractor):
                                return
                        if req_format is None:
                                video_url_list = [(existing_formats[0], url_map[existing_formats[0]])] # Best quality
+                       elif req_format == 'worst':
+                               video_url_list = [(existing_formats[len(existing_formats)-1], url_map[existing_formats[len(existing_formats)-1]])] # worst quality
                        elif req_format == '-1':
                                video_url_list = [(f, url_map[f]) for f in existing_formats] # All formats
                        else: