1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

make metadata path configurable

This commit is contained in:
Luke Pulverenti 2014-03-25 17:13:55 -04:00
parent 3caaa0fbc2
commit a41f301fe2
16 changed files with 366 additions and 329 deletions

View file

@ -28,20 +28,6 @@
$('#chkRunAtStartup', page).checked(config.RunAtStartup).checkboxradio("refresh");
$('#txtCachePath', page).val(config.CachePath || '');
var customCachePath = config.CachePath ? true : false;
$('#chkEnableCustomCachePath', page).checked(customCachePath).checkboxradio("refresh");
if (customCachePath) {
$('#fldEnterCachePath', page).show();
$('#txtCachePath', page).attr("required", "required");
} else {
$('#fldEnterCachePath', page).hide();
$('#txtCachePath', page).removeAttr("required");
}
Dashboard.hideLoadingMsg();
}
@ -61,45 +47,6 @@
});
$('#btnSelectCachePath', page).on("click.selectDirectory", function () {
var picker = new DirectoryBrowser(page);
picker.show({
callback: function (path) {
if (path) {
$('#txtCachePath', page).val(path);
}
picker.close();
},
header: "Select Server Cache Path",
instruction: "Browse or enter the path to use for Media Browser Server cache. The folder must be writeable. The location of this folder will directly impact server performance and should ideally be placed on a solid state drive."
});
});
$('#chkEnableCustomCachePath', page).on("change.showCachePathText", function () {
if (this.checked) {
$('#fldEnterCachePath', page).show();
$('#txtCachePath', page).attr("required", "required");
} else {
$('#fldEnterCachePath', page).hide();
$('#txtCachePath', page).removeAttr("required");
}
});
}).on('pagehide', "#advancedConfigurationPage", function () {
var page = this;
$('#chkEnableCustomCachePath', page).off("change.showCachePathText");
$('#btnSelectCachePath', page).off("click.selectDirectory");
}).on('pageinit', "#advancedConfigurationPage", function () {
var page = this;
@ -127,12 +74,6 @@
ApiClient.getServerConfiguration().done(function (config) {
if ($('#chkEnableCustomCachePath', form).checked()) {
config.CachePath = $('#txtCachePath', form).val();
} else {
config.CachePath = '';
}
config.EnableDebugLevelLogging = $('#chkDebugLog', form).checked();
config.RunAtStartup = $('#chkRunAtStartup', form).checked();