Remove --avconv in favour of --encoder

This commit is contained in:
Ritiek Malhotra
2020-04-23 23:06:15 +05:30
parent 2feb9c4b49
commit 629d1643c7
2 changed files with 1 additions and 15 deletions

View File

@@ -107,13 +107,6 @@ def get_arguments(argv=None, to_merge=True):
help="do not embed metadata in tracks",
action="store_true",
)
parser.add_argument(
"-a",
"--avconv",
default=config["avconv"],
help="use avconv for conversion (otherwise defaults to ffmpeg)",
action="store_true",
)
parser.add_argument(
"-e",
"--encoder",
@@ -279,7 +272,7 @@ def run_errands(parser, parsed, config):
if parsed.write_m3u and not parsed.list:
parser.error("--write-m3u can only be used with --list")
if parsed.avconv and parsed.trim_silence:
if parsed.trim_silence and not "ffmpeg" in parsed.encoder:
parser.error("--trim-silence can only be used with FFmpeg")
if parsed.write_to and not (
@@ -289,12 +282,6 @@ def run_errands(parser, parsed, config):
"--write-to can only be used with --playlist, --album, --all-albums, or --username"
)
if parsed.avconv:
# log.warn('-a / --avconv is deprecated and will be removed in future versions. '
# 'Use "-e avconv" or "--encoder avconv" instead)
parsed.encoder = "avconv"
del parsed.avconv
encoder_exists = shutil.which(parsed.encoder)
if not encoder_exists:
# log.warn("Specified encoder () was not found. Will not encode to specified "

View File

@@ -9,7 +9,6 @@ DEFAULT_CONFIGURATION = {
"manual": False,
"no-metadata": False,
"no-fallback-metadata": False,
"avconv": False,
"encoder": "ffmpeg",
"overwrite": "prompt",
"quality": "best",