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

allow customization of ffmpeg path

This commit is contained in:
Luke Pulverenti 2016-06-20 02:19:28 -04:00
parent 00e12e6fea
commit 7c8d2dd1d3
4 changed files with 52 additions and 5 deletions

View file

@ -7,6 +7,7 @@
$('#selectVideoDecoder', page).val(config.HardwareAccelerationType);
$('#selectThreadCount', page).val(config.EncodingThreadCount);
$('#txtDownMixAudioBoost', page).val(config.DownMixAudioBoost);
$('.txtEncoderPath', page).val(config.EncoderAppPath || '');
$('#txtTranscodingTempPath', page).val(config.TranscodingTempPath || '');
Dashboard.hideLoadingMsg();
@ -16,13 +17,14 @@
var form = this;
var onDecoderConfirmed = function() {
var onDecoderConfirmed = function () {
Dashboard.showLoadingMsg();
ApiClient.getNamedConfiguration("encoding").then(function (config) {
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();
@ -74,6 +76,27 @@
var page = this;
$('#btnSelectEncoderPath', page).on("click.selectDirectory", function () {
require(['directorybrowser'], function (directoryBrowser) {
var picker = new directoryBrowser({
includeFiles: true
});
picker.show({
callback: function (path) {
if (path) {
$('.txtEncoderPath', page).val(path);
}
picker.close();
}
});
});
});
$('#btnSelectTranscodingTempPath', page).on("click.selectDirectory", function () {
require(['directorybrowser'], function (directoryBrowser) {
@ -104,13 +127,21 @@
Dashboard.showLoadingMsg();
LibraryMenu.setTabs('playback',3, getTabs);
LibraryMenu.setTabs('playback', 3, getTabs);
var page = this;
ApiClient.getNamedConfiguration("encoding").then(function (config) {
loadPage(page, config);
});
ApiClient.getSystemInfo().then(function (systemInfo) {
if (systemInfo.HasExternalEncoder) {
page.querySelector('.fldEncoderPath').classList.add('hide');
} else {
page.querySelector('.fldEncoderPath').classList.remove('hide');
}
});
});