mirror of
https://github.com/morpheus65535/bazarr.git
synced 2025-02-21 21:34:48 +08:00
Fix for #605.
This commit is contained in:
parent
63d5037566
commit
d65601d9cb
1 changed files with 2 additions and 0 deletions
|
@ -866,6 +866,8 @@ def save_subtitles(file_path, subtitles, single=False, directory=None, chmod=Non
|
||||||
logger.debug(u"Saving %r to %r", subtitle, subtitle_path)
|
logger.debug(u"Saving %r to %r", subtitle, subtitle_path)
|
||||||
content = subtitle.get_modified_content(format=format, debug=debug_mods)
|
content = subtitle.get_modified_content(format=format, debug=debug_mods)
|
||||||
if content:
|
if content:
|
||||||
|
if os.path.exists(subtitle_path):
|
||||||
|
os.remove(subtitle_path)
|
||||||
with open(subtitle_path, 'w') as f:
|
with open(subtitle_path, 'w') as f:
|
||||||
f.write(content)
|
f.write(content)
|
||||||
subtitle.storage_path = subtitle_path
|
subtitle.storage_path = subtitle_path
|
||||||
|
|
Loading…
Reference in a new issue