Support reading & writing to STDIN & STDOUT respectively

This commit is contained in:
Ritiek Malhotra
2020-04-22 16:02:27 +05:30
parent f24c026ae4
commit 7ddc5c6348
5 changed files with 75 additions and 24 deletions

View File

@@ -219,6 +219,13 @@ def get_arguments(argv=None, to_merge=True):
"when YouTube API key is set",
action="store_true",
)
parser.add_argument(
"--processor",
default=config["processor"],
help='list downloading strategy: - "synchronous" downloads '
'tracks one-by-one. - "threaded" (highly experimental!) pre-fetches '
'the next track\'s metadata for more efficient downloading'
)
parser.add_argument(
"-ns",
"--no-spaces",
@@ -327,6 +334,13 @@ def run_errands(parser, parsed):
setattr(parsed, "tracks", parsed.song)
del parsed.song
if parsed.file_format == "-" and parsed.no_metadata is False:
# log.warn(
# "Cannot write metadata when target file is STDOUT. Pass "
# "--no-metadata explicitly to hide this warning."
# )
parsed.no_metadata = True
parsed.log_level = log_leveller(parsed.log_level)
return parsed