]> gitweb @ CieloNegro.org - youtube-dl.git/blobdiff - youtube-dl
Set version number
[youtube-dl.git] / youtube-dl
index 91ee099ceab577fb1514eaa52e633fbca9fa2306..bb982e22a62d3379f0d7ba0049d594a7a56687ec 100755 (executable)
@@ -260,7 +260,9 @@ class FileDownloader(object):
                        return
 
                try:
-                       filename = self.params['outtmpl'] % info_dict
+                       template_dict = dict(info_dict)
+                       template_dict['epoch'] = unicode(long(time.time()))
+                       filename = self.params['outtmpl'] % template_dict
                        self.report_destination(filename)
                except (ValueError, KeyError), err:
                        self.trouble('ERROR: invalid output template or system charset: %s' % str(err))
@@ -433,7 +435,7 @@ class YoutubeIE(InfoExtractor):
        _LOGIN_URL = 'http://www.youtube.com/signup?next=/&gl=US&hl=en'
        _AGE_URL = 'http://www.youtube.com/verify_age?next_url=/&gl=US&hl=en'
        _NETRC_MACHINE = 'youtube'
-       _available_formats = ['22', '18', '17', '13'] # listed in order of priority for -b flag
+       _available_formats = ['22', '35', '18', '17', '13'] # listed in order of priority for -b flag
        _video_extensions = {
                '13': '3gp',
                '17': 'mp4',
@@ -994,7 +996,7 @@ if __name__ == '__main__':
                # Parse command line
                parser = optparse.OptionParser(
                        usage='Usage: %prog [options] url...',
-                       version='INTERNAL',
+                       version='2009.05.13',
                        conflict_handler='resolve',
                )
 
@@ -1020,11 +1022,11 @@ if __name__ == '__main__':
                video_format.add_option('-f', '--format',
                                action='append', dest='format', metavar='FMT', help='video format code')
                video_format.add_option('-b', '--best-quality',
-                               action='append_const', dest='format', help='download the best quality video possible', const='0')
+                               action='store_const', dest='format', help='download the best quality video possible', const='0')
                video_format.add_option('-m', '--mobile-version',
-                               action='append_const', dest='format', help='alias for -f 17', const='17')
+                               action='store_const', dest='format', help='alias for -f 17', const='17')
                video_format.add_option('-d', '--high-def',
-                               action='append_const', dest='format', help='alias for -f 22', const='22')
+                               action='store_const', dest='format', help='alias for -f 22', const='22')
                parser.add_option_group(video_format)
 
                verbosity = optparse.OptionGroup(parser, 'Verbosity / Simulation Options')