1
0
mirror of https://github.com/spaam/svtplay-dl.git synced 2024-11-23 19:55:38 +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