From ab693c4b506854ee40d40471a7a9f22beecd4d5c Mon Sep 17 00:00:00 2001 From: Halali Date: Wed, 27 Feb 2019 21:55:06 +0100 Subject: [PATCH] Revert: Remove chmod feature --- bazarr/config.py | 1 + bazarr/get_subtitle.py | 3 ++- views/settings.tpl | 31 +++++++++++++++++++++++++++++++ 3 files changed, 34 insertions(+), 1 deletion(-) diff --git a/bazarr/config.py b/bazarr/config.py index 2230199c5..92beec7bf 100644 --- a/bazarr/config.py +++ b/bazarr/config.py @@ -35,6 +35,7 @@ defaults = { 'enabled_providers': '', 'throtteled_providers': '', 'multithreading': 'True', + 'chmod': '0640', 'subfolder': 'current', 'subfolder_custom': '' }, diff --git a/bazarr/get_subtitle.py b/bazarr/get_subtitle.py index 1d20f2c0a..7f091dd37 100644 --- a/bazarr/get_subtitle.py +++ b/bazarr/get_subtitle.py @@ -166,10 +166,11 @@ def download_subtitle(path, language, hi, providers, providers_auth, sceneName, try: fld = get_target_folder(path) + chmod = int(settings.general.chmod, 8) if sys.platform.startswith('linux') else None saved_subtitles = save_subtitles(video.original_path, subtitles, single=single, tags=None, # fixme directory=fld, - chmod=None, + chmod=chmod, # formats=("srt", "vtt") path_decoder=force_unicode ) diff --git a/views/settings.tpl b/views/settings.tpl index 5e1c6a4c8..dce0e8e75 100644 --- a/views/settings.tpl +++ b/views/settings.tpl @@ -152,6 +152,28 @@ + % import sys + % if sys.platform.startswith('linux'): +
+
+ +
+
+
+
+ + +
+
+
+ +
+ %end
@@ -2348,6 +2370,15 @@ } ] }, + % if sys.platform.startswith('linux'): + settings_general_chmod: { + rules: [ + { + type: 'regExp[^(0[0-7]{3})$]', + prompt: 'Please use only 4-digit integers with leading 0 (e.g.: 775)' + } + ] + }, % end settings_subfolder_custom : { rules : [