X-Git-Url: http://git.cielonegro.org/gitweb.cgi?a=blobdiff_plain;ds=sidebyside;f=youtube-dl;h=b2dc7952d9c3a0a1c7ed41bde7be98d3e887f3a2;hb=cab60d710afc4a00469d8b08a74d733802d2067b;hp=2708fe4e7acb3aa1b34ec847f64b82e5ba7a42ce;hpb=d09744d0553650065195a212a826e4267bcfed7b;p=youtube-dl.git diff --git a/youtube-dl b/youtube-dl index 2708fe4e7..b2dc7952d 100755 --- a/youtube-dl +++ b/youtube-dl @@ -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)) @@ -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')