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

support configurable transcoding temporary path

This commit is contained in:
Luke Pulverenti 2014-01-11 13:58:50 -05:00
parent 02cd9ef7f7
commit bcf0a737d2
2 changed files with 89 additions and 7 deletions

View file

@ -10,16 +10,64 @@
}).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");
}
Dashboard.hideLoadingMsg();
}
$(document).on('pageshow', "#encodingSettingsPage", function () {
$(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 () {
Dashboard.showLoadingMsg();
var page = this;
ApiClient.getServerConfiguration().done(function(config) {
ApiClient.getServerConfiguration().done(function (config) {
loadPage(page, config);
@ -36,6 +84,12 @@
ApiClient.getServerConfiguration().done(function (config) {
if ($('#chkEnableCustomTranscodingTempPath', form).checked()) {
config.TranscodingTempPath = $('#txtTranscodingTempPath', form).val();
} else {
config.TranscodingTempPath = '';
}
config.EnableDebugEncodingLogging = $('#chkEnableDebugEncodingLogging', form).checked();
config.MediaEncodingQuality = $('.radioEncodingQuality:checked', form).val();