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:
parent
96b8b5ccce
commit
aca99415b8
1 changed files with 8 additions and 0 deletions
|
@ -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
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue