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

@ -10,60 +10,12 @@
}).checkboxradio('refresh');
$('#txtTranscodingTempPath', page).val(config.TranscodingTempPath || '');
var transcodingTempPath = config.TranscodingTempPath ? true : false;
$('#chkEnableCustomTranscodingTempPath', page).checked(transcodingTempPath).checkboxradio("refresh");
if (transcodingTempPath) {
$('#fldEnterTranscodingTempPath', page).show();
$('#txtTranscodingTempPath', page).attr("required", "required");
} else {
$('#fldEnterTranscodingTempPath', page).hide();
$('#txtTranscodingTempPath', page).removeAttr("required");
}
$('#chkAllowUpscaling', page).checked(config.AllowVideoUpscaling).checkboxradio("refresh");
Dashboard.hideLoadingMsg();
}
$(document).on('pageinit', "#encodingSettingsPage", function () {
var page = this;
$('#btnSelectTranscodingTempPath', page).on("click.selectDirectory", function () {
var picker = new DirectoryBrowser(page);
picker.show({
callback: function (path) {
if (path) {
$('#txtTranscodingTempPath', page).val(path);
}
picker.close();
},
header: "Select Transcoding Temporary Path",
instruction: "Browse or enter the path to use for transcoding temporary files. The folder must be writeable."
});
});
$('#chkEnableCustomTranscodingTempPath', page).on("change.showTranscodingTempPathText", function () {
if (this.checked) {
$('#fldEnterTranscodingTempPath', page).show();
$('#txtTranscodingTempPath', page).attr("required", "required");
} else {
$('#fldEnterTranscodingTempPath', page).hide();
$('#txtTranscodingTempPath', page).removeAttr("required");
}
});
}).on('pageshow', "#encodingSettingsPage", function () {
$(document).on('pageshow', "#encodingSettingsPage", function () {
Dashboard.showLoadingMsg();
@ -86,12 +38,6 @@
ApiClient.getServerConfiguration().done(function (config) {
if ($('#chkEnableCustomTranscodingTempPath', form).checked()) {
config.TranscodingTempPath = $('#txtTranscodingTempPath', form).val();
} else {
config.TranscodingTempPath = '';
}
config.AllowVideoUpscaling = $('#chkAllowUpscaling', form).checked();
config.EnableDebugEncodingLogging = $('#chkEnableDebugEncodingLogging', form).checked();
config.MediaEncodingQuality = $('.radioEncodingQuality:checked', form).val();