Pass %(ext)s when filename is provided on command line

This commit is contained in:
Eric Torres 2019-06-17 20:38:52 -07:00
parent b6d2c0b38b
commit 343df18c83

View File

@ -58,7 +58,7 @@ if __name__ == "__main__":
# filename handling # filename handling
# if -b is used, DEFAULT_FILENAME must take precedence # if -b is used, DEFAULT_FILENAME must take precedence
if args.filename is not None and args.batchfile is None: if args.filename is not None and args.batchfile is None:
dl_opts.append(f"--output={args.filename}") dl_opts.append(f"--output={Path.home() / 'Music' / args.filename}.%(ext)s")
else: else:
dl_opts.append(f"--output={DEFAULT_FILENAME}") dl_opts.append(f"--output={DEFAULT_FILENAME}")