Catch enabling conversion without specifying codec

Signed-off-by: nathom <nathanthomas707@gmail.com>
This commit is contained in:
nathom 2021-06-10 10:44:23 -07:00
parent 14710d536a
commit df29a338c6
2 changed files with 14 additions and 7 deletions

View file

@ -570,7 +570,14 @@ class Track:
"M4A": converter.AAC,
}
self.container = codec.upper()
try:
self.container = codec.upper()
except AttributeError:
click.secho(
"Error: No audio codec chosen to convert to.", fg="red"
)
raise click.Abort
if not hasattr(self, "final_path"):
self.format_final_path()