Chmod fixes

pull/489/head
Halali 6 years ago
parent ab693c4b50
commit cba6b174e9

@ -166,7 +166,7 @@ def download_subtitle(path, language, hi, providers, providers_auth, sceneName,
try: try:
fld = get_target_folder(path) fld = get_target_folder(path)
chmod = int(settings.general.chmod, 8) if sys.platform.startswith('linux') else None chmod = int(settings.general.chmod, 8) if not sys.platform.startswith('win') else None
saved_subtitles = save_subtitles(video.original_path, subtitles, single=single, saved_subtitles = save_subtitles(video.original_path, subtitles, single=single,
tags=None, # fixme tags=None, # fixme
directory=fld, directory=fld,

@ -152,9 +152,7 @@
</div> </div>
</div> </div>
</div> </div>
% import sys <div id="chmod" class="middle aligned row">
% if sys.platform.startswith('linux'):
<div class="middle aligned row">
<div class="right aligned four wide column"> <div class="right aligned four wide column">
<label>Set subtitle file permissions to</label> <label>Set subtitle file permissions to</label>
</div> </div>
@ -168,12 +166,11 @@
</div> </div>
</div> </div>
<div class="collapsed center aligned column"> <div class="collapsed center aligned column">
<div class="ui basic icon" data-tooltip="Must be integer, e.g.: 0775" data-inverted=""> <div class="ui basic icon" data-tooltip="Must be 4 digit octal, e.g.: 0775" data-inverted="">
<i class="help circle large icon"></i> <i class="help circle large icon"></i>
</div> </div>
</div> </div>
</div> </div>
%end
<div class="middle aligned row"> <div class="middle aligned row">
<div class="right aligned four wide column"> <div class="right aligned four wide column">
@ -1978,6 +1975,10 @@
% if args.no_update: % if args.no_update:
$("#div_update").hide(); $("#div_update").hide();
% end % end
% import sys
% if sys.platform.startswith('win'):
$("#chmod").hide();
% end
$('.menu .item') $('.menu .item')
.tab() .tab()
@ -2370,12 +2371,12 @@
} }
] ]
}, },
% if sys.platform.startswith('linux'): % if not sys.platform.startswith('win'):
settings_general_chmod: { settings_general_chmod: {
rules: [ rules: [
{ {
type: 'regExp[^(0[0-7]{3})$]', type: 'regExp[^([0-7]{4})$]',
prompt: 'Please use only 4-digit integers with leading 0 (e.g.: 775)' prompt: 'Please use only 4-digit octal (e.g.: 0775)'
} }
] ]
}, },

Loading…
Cancel
Save