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

@ -56,6 +56,7 @@ define(['browser'], function (browser) {
dependencies.push('jqmlistview');
dependencies.push('scripts/notifications');
dependencies.push('dashboardcss');
dependencies.push('emby-icons');
}
return new Promise(function (resolve, reject) {

View file

@ -34,10 +34,22 @@
</label>
<div class="fieldDescription checkboxFieldDescription">${OptionEnableTranscodingThrottleHelp}</div>
</div>
<div class="inputContainer fldEncoderPath hide">
<div style="display: flex; align-items: center;">
<div style="flex-grow:1;">
<input is="emby-input" class="txtEncoderPath" label="${LabelffmpegPath}" autocomplete="off" />
</div>
<button type="button" is="paper-icon-button-light" id="btnSelectEncoderPath" class="autoSize"><i class="md-icon">search</i></button>
</div>
<div class="fieldDescription">
<div>${LabelffmpegPathHelp}</div>
<div>${LabelffmpegPathHelp2}</div>
</div>
</div>
<div class="inputContainer">
<div style="display: flex; align-items: center;">
<div style="flex-grow:1;">
<input is="emby-input" id="txtTranscodingTempPath" label="${LabelTranscodingTempPath}" required="required" autocomplete="off" />
<input is="emby-input" id="txtTranscodingTempPath" label="${LabelTranscodingTempPath}" autocomplete="off" />
</div>
<button type="button" is="paper-icon-button-light" id="btnSelectTranscodingTempPath" class="autoSize"><i class="md-icon">search</i></button>
</div>

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();
@ -23,6 +24,7 @@
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) {
@ -110,7 +133,15 @@
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');
}
});
});

View file

@ -2372,5 +2372,8 @@
"LabelBindToLocalNetworkAddressHelp": "Optional. Override the local IP address to bind the http server to. If left empty, the server will bind to all availabile addresses. Changing this value requires restarting Emby Server.",
"TitleHostingSettings": "Hosting Settings",
"SettingsWarning": "Changing these values may cause instability or connectivity failures. If you experience any problems, we recommend changing them back to default.",
"MapChannels": "Map Channels"
"MapChannels": "Map Channels",
"LabelffmpegPath": "FFMpeg path:",
"LabelffmpegPathHelp": "The path to your ffmpeg application, or folder containing ffmpeg.",
"LabelffmpegPathHelp2": "Important: FFProbe must exist within the same folder."
}