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

output: --force should work on subtitles too

This commit is contained in:
Johan Andersson 2018-07-05 01:24:45 +02:00
parent a0ab26a939
commit e377ee7386

View File

@ -177,7 +177,7 @@ def output(output, config, extension="mp4", mode="wb", **kwargs):
name = formatname(output, config, extension)
logging.info("Outfile: %s", name)
if os.path.isfile(name):
if os.path.isfile(name) and not config.get("force"):
logging.warning("File ({}) already exists. Use --force to overwrite".format(name))
return None
if findexpisode(output, os.path.dirname(os.path.realpath(name)), os.path.basename(name)):