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('jqmlistview');
dependencies.push('scripts/notifications'); dependencies.push('scripts/notifications');
dependencies.push('dashboardcss'); dependencies.push('dashboardcss');
dependencies.push('emby-icons');
} }
return new Promise(function (resolve, reject) { return new Promise(function (resolve, reject) {

View file

@ -34,17 +34,29 @@
</label> </label>
<div class="fieldDescription checkboxFieldDescription">${OptionEnableTranscodingThrottleHelp}</div> <div class="fieldDescription checkboxFieldDescription">${OptionEnableTranscodingThrottleHelp}</div>
</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 class="inputContainer">
<div style="display: flex; align-items: center;"> <div style="display: flex; align-items: center;">
<div style="flex-grow:1;"> <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> </div>
<button type="button" is="paper-icon-button-light" id="btnSelectTranscodingTempPath" class="autoSize"><i class="md-icon">search</i></button> <button type="button" is="paper-icon-button-light" id="btnSelectTranscodingTempPath" class="autoSize"><i class="md-icon">search</i></button>
</div> </div>
<div class="fieldDescription">${LabelTranscodingTempPathHelp}</div> <div class="fieldDescription">${LabelTranscodingTempPathHelp}</div>
</div> </div>
<div class="inputContainer"> <div class="inputContainer">
<input is="emby-input" type="number" id="txtDownMixAudioBoost" pattern="[0-9]*" required="required" min=".5" max="3" step=".1" label="${LabelDownMixAudioScale}"/> <input is="emby-input" type="number" id="txtDownMixAudioBoost" pattern="[0-9]*" required="required" min=".5" max="3" step=".1" label="${LabelDownMixAudioScale}" />
<div class="fieldDescription">${LabelDownMixAudioScaleHelp}</div> <div class="fieldDescription">${LabelDownMixAudioScaleHelp}</div>
</div> </div>

View file

@ -7,6 +7,7 @@
$('#selectVideoDecoder', page).val(config.HardwareAccelerationType); $('#selectVideoDecoder', page).val(config.HardwareAccelerationType);
$('#selectThreadCount', page).val(config.EncodingThreadCount); $('#selectThreadCount', page).val(config.EncodingThreadCount);
$('#txtDownMixAudioBoost', page).val(config.DownMixAudioBoost); $('#txtDownMixAudioBoost', page).val(config.DownMixAudioBoost);
$('.txtEncoderPath', page).val(config.EncoderAppPath || '');
$('#txtTranscodingTempPath', page).val(config.TranscodingTempPath || ''); $('#txtTranscodingTempPath', page).val(config.TranscodingTempPath || '');
Dashboard.hideLoadingMsg(); Dashboard.hideLoadingMsg();
@ -16,13 +17,14 @@
var form = this; var form = this;
var onDecoderConfirmed = function() { var onDecoderConfirmed = function () {
Dashboard.showLoadingMsg(); Dashboard.showLoadingMsg();
ApiClient.getNamedConfiguration("encoding").then(function (config) { ApiClient.getNamedConfiguration("encoding").then(function (config) {
config.DownMixAudioBoost = $('#txtDownMixAudioBoost', form).val(); config.DownMixAudioBoost = $('#txtDownMixAudioBoost', form).val();
config.TranscodingTempPath = $('#txtTranscodingTempPath', form).val(); config.TranscodingTempPath = $('#txtTranscodingTempPath', form).val();
config.EncoderAppPath = $('.txtEncoderPath', form).val();
config.EncodingThreadCount = $('#selectThreadCount', form).val(); config.EncodingThreadCount = $('#selectThreadCount', form).val();
config.HardwareAccelerationType = $('#selectVideoDecoder', form).val(); config.HardwareAccelerationType = $('#selectVideoDecoder', form).val();
@ -74,6 +76,27 @@
var page = this; 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 () { $('#btnSelectTranscodingTempPath', page).on("click.selectDirectory", function () {
require(['directorybrowser'], function (directoryBrowser) { require(['directorybrowser'], function (directoryBrowser) {
@ -104,13 +127,21 @@
Dashboard.showLoadingMsg(); Dashboard.showLoadingMsg();
LibraryMenu.setTabs('playback',3, getTabs); LibraryMenu.setTabs('playback', 3, getTabs);
var page = this; var page = this;
ApiClient.getNamedConfiguration("encoding").then(function (config) { ApiClient.getNamedConfiguration("encoding").then(function (config) {
loadPage(page, 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.", "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", "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.", "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."
} }