mirror of
https://github.com/spaam/svtplay-dl.git
synced 2024-11-27 21:54:17 +01:00
output: Raw subs now affected by --force-subtitles and not --force
This commit is contained in:
parent
f77b560ad8
commit
b3f03c2a69
@ -142,6 +142,7 @@ def filename(stream):
|
||||
|
||||
|
||||
def output(options, extention="mp4", openfd=True, mode="wb", **kwargs):
|
||||
subtitlefiles = ["srt", "smi", "tt","sami", "wrst"]
|
||||
if is_py2:
|
||||
file_d = file
|
||||
else:
|
||||
@ -158,7 +159,7 @@ def output(options, extention="mp4", openfd=True, mode="wb", **kwargs):
|
||||
log.info("Outfile: %s", options.output)
|
||||
if os.path.isfile(options.output) or \
|
||||
findexpisode(os.path.dirname(os.path.realpath(options.output)), options.service, os.path.basename(options.output)):
|
||||
if extention == "srt":
|
||||
if extention in subtitlefiles:
|
||||
if not options.force_subtitle:
|
||||
log.error("File already exists. Use --force-subtitle to overwrite")
|
||||
return None
|
||||
|
Loading…
Reference in New Issue
Block a user