Revert: Remove chmod feature

This commit is contained in:
Halali 2019-02-27 21:55:06 +01:00
parent 5f2a98776f
commit ab693c4b50
3 changed files with 34 additions and 1 deletions

View File

@ -35,6 +35,7 @@ defaults = {
'enabled_providers': '',
'throtteled_providers': '',
'multithreading': 'True',
'chmod': '0640',
'subfolder': 'current',
'subfolder_custom': ''
},

View File

@ -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
)

View File

@ -152,6 +152,28 @@
</div>
</div>
</div>
% import sys
% if sys.platform.startswith('linux'):
<div class="middle aligned row">
<div class="right aligned four wide column">
<label>Set subtitle file permissions to</label>
</div>
<div class="five wide column">
<div class='field'>
<div id="settings_chmod" class="ui fluid input">
<input name="settings_general_chmod" type="text"
value={{ settings.general.chmod }}>
<label></label>
</div>
</div>
</div>
<div class="collapsed center aligned column">
<div class="ui basic icon" data-tooltip="Must be integer, e.g.: 0775" data-inverted="">
<i class="help circle large icon"></i>
</div>
</div>
</div>
%end
<div class="middle aligned row">
<div class="right aligned four wide column">
@ -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 : [