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

update startup wizard

This commit is contained in:
Luke Pulverenti 2016-06-23 13:04:18 -04:00
parent 681639cc95
commit b4c8cb07c9
16 changed files with 256 additions and 70 deletions

View file

@ -13,6 +13,20 @@
Dashboard.hideLoadingMsg();
}
function onSaveEncodingPathFailure(response) {
Dashboard.hideLoadingMsg();
var msg = '';
// This is a fallback that handles both 404 and 400 (no path entered)
msg = Globalize.translate('FFmpegSavePathNotFound');
require(['alert'], function (alert) {
alert(msg);
});
}
function onSubmit() {
var form = this;
@ -24,13 +38,22 @@
config.DownMixAudioBoost = $('#txtDownMixAudioBoost', form).val();
config.TranscodingTempPath = $('#txtTranscodingTempPath', form).val();
config.EncoderAppPath = $('.txtEncoderPath', form).val();
config.EncodingThreadCount = $('#selectThreadCount', form).val();
config.HardwareAccelerationType = $('#selectVideoDecoder', form).val();
config.EnableThrottling = form.querySelector('#chkEnableThrottle').checked;
ApiClient.updateNamedConfiguration("encoding", config).then(Dashboard.processServerConfigurationUpdateResult);
ApiClient.updateNamedConfiguration("encoding", config).then(function () {
ApiClient.ajax({
url: ApiClient.getUrl('System/MediaEncoder/Path'),
type: 'POST',
data: {
Path: form.querySelector('.txtEncoderPath').value
}
}).then(Dashboard.processServerConfigurationUpdateResult, onSaveEncodingPathFailure);
});
});
};
@ -80,12 +103,11 @@
require(['directorybrowser'], function (directoryBrowser) {
var picker = new directoryBrowser({
includeFiles: true
});
var picker = new directoryBrowser();
picker.show({
includeFiles: true,
callback: function (path) {
if (path) {