Added file permissions & folder permissions to config page

This commit is contained in:
rembo10
2013-09-08 15:03:23 +05:30
parent 2f07d952b2
commit 2e1c9d7f84
2 changed files with 14 additions and 2 deletions

View File

@@ -685,6 +685,14 @@
<div class="row left checkbox">
<input type="checkbox" name="autowant_all" value="1" ${config['autowant_all']} /><label>Automatically Mark All Albums as Wanted</label>
</div>
<div class="row">
<label>Folder Permissions:</label>
<input type="text" name="folder_permissions" value="${config['folder_permissions']}" size="7">
</div>
<div class="row">
<label>File Permissions:</label>
<input type="text" name="file_permissions" value="${config['file_permissions']}" size="7">
</div>
<div class="row">
<label>Cache Size (in MB):</label>
<input type="text" name="cache_sizemb" value="${config['cache_sizemb']}" size="7">

View File

@@ -696,7 +696,9 @@ class WebInterface(object):
"customsleep": headphones.CUSTOMSLEEP,
"hpuser": headphones.HPUSER,
"hppass": headphones.HPPASS,
"cache_sizemb":headphones.CACHE_SIZEMB,
"cache_sizemb": headphones.CACHE_SIZEMB,
"file_permissions": headphones.FILE_PERMISSIONS,
"folder_permissions": headphones.FOLDER_PERMISSIONS
}
# Need to convert EXTRAS to a dictionary we can pass to the config: it'll come in as a string like 2,5,6,8
@@ -731,7 +733,7 @@ class WebInterface(object):
xbmc_update=0, xbmc_notify=0, nma_enabled=False, nma_apikey=None, nma_priority=0, nma_onsnatch=0, synoindex_enabled=False,
pushover_enabled=0, pushover_onsnatch=0, pushover_keys=None, pushover_priority=0, mirror=None, customhost=None, customport=None,
customsleep=None, hpuser=None, hppass=None, preferred_bitrate_high_buffer=None, preferred_bitrate_low_buffer=None, preferred_bitrate_allow_lossless=0, cache_sizemb=None,
enable_https=0, https_cert=None, https_key=None, **kwargs):
enable_https=0, https_cert=None, https_key=None, file_permissions=None, folder_permissions=None, **kwargs):
headphones.HTTP_HOST = http_host
headphones.HTTP_PORT = http_port
@@ -860,6 +862,8 @@ class WebInterface(object):
headphones.HPUSER = hpuser
headphones.HPPASS = hppass
headphones.CACHE_SIZEMB = int(cache_sizemb)
headphones.FILE_PERMISSIONS = file_permissions
headphones.FOLDER_PERMISSIONS = folder_permissions
# Handle the variable config options. Note - keys with False values aren't getting passed