1
0
Fork 0
mirror of https://github.com/morpheus65535/bazarr synced 2025-01-01 04:26:13 +00:00

Added chmod execution (if required) after manually triggered tools execution. #1478

This commit is contained in:
morpheus65535 2021-07-26 20:14:39 -04:00
parent 96b8b5ccce
commit aca99415b8

View file

@ -1,5 +1,7 @@
# coding=utf-8
import sys
import os
import ast
from datetime import timedelta
from dateutil import rrule
@ -1977,6 +1979,12 @@ class Subtitles(Resource):
else:
subtitles_apply_mods(language, subtitles_path, [action])
# apply chmod if required
chmod = int(settings.general.chmod, 8) if not sys.platform.startswith(
'win') and settings.general.getboolean('chmod_enabled') else None
if chmod:
os.chmod(subtitles_path, chmod)
return '', 204