diff --git a/nts/cli.py b/nts/cli.py index b83d3bc..c2a8a1a 100644 --- a/nts/cli.py +++ b/nts/cli.py @@ -19,13 +19,26 @@ def main(): usage = "Usage: %prog [options] args" parser = OptionParser(usage=usage) - parser.add_option("-o", "--out-dir", dest="output_directory", default=download_dir, action="store", type="string", - help="where the files will be downloaded, defaults to ~/Downloads on macOS and %USERPROFILE%\\Downloads", metavar="DIR") - parser.add_option("-v", "--version", default=False, - dest="version", action="store_true", + parser.add_option( + "-o", + "--out-dir", + dest="output_directory", + default=download_dir, + action="store", + type="string", + help="where the files will be downloaded, defaults to ~/Downloads on macOS and %USERPROFILE%\\Downloads", + metavar="DIR") + parser.add_option("-v", + "--version", + default=False, + dest="version", + action="store_true", help="print the version number and quit") - parser.add_option("-q", "--quiet", default=False, - dest="quiet", action="store_true", + parser.add_option("-q", + "--quiet", + default=False, + dest="quiet", + action="store_true", help="only print errors") (options, args) = parser.parse_args() @@ -49,7 +62,8 @@ def url_matcher(url): match_sh = re.match(show_regex, url) if match_ep: - nts.download(url=url, quiet=options.quiet, + nts.download(url=url, + quiet=options.quiet, save_dir=download_dir) elif match_sh: episodes = nts.get_episodes_of_show(match_sh.group(1))