1
0
mirror of https://github.com/spaam/svtplay-dl.git synced 2024-11-24 04:05:39 +01:00

output.formatname: slap the extension at the end of the output

This commit is contained in:
Johan Andersson 2021-05-13 13:32:17 +02:00
parent 2f10e1b556
commit da31b75ec9

View File

@ -148,7 +148,7 @@ def formatname(output, config):
name = pathlib.Path(config.get("path")) / name.name
elif config.get("output"):
if output["ext"]:
name = pathlib.Path(config.get("output")).with_suffix(f".{output['ext']}")
name = pathlib.Path(f"{config.get('output')}.{output['ext']}")
else:
name = pathlib.Path(config.get("output"))
return name