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

Merge pull request #128 from ploughpuff/ffmpeg

Always show FFmpeg path in Transcoding page
This commit is contained in:
Joshua M. Boniface 2019-03-10 01:53:32 -05:00 committed by GitHub
commit 7bd77a5ce1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 17 additions and 6 deletions

View file

@ -91,10 +91,10 @@
<div class="fieldDescription">${LabelTranscodingThreadCountHelp}</div>
</div>
<div class="inputContainer fldEncoderPath hide">
<div class="inputContainer fldEncoderPath">
<div style="display: flex; align-items: center;">
<div style="flex-grow:1;">
<input is="emby-input" class="txtEncoderPath" label="${LabelffmpegPath}" autocomplete="off" required />
<input is="emby-input" class="txtEncoderPath" label="${LabelffmpegPath}" autocomplete="off" />
</div>
<button type="button" is="paper-icon-button-light" id="btnSelectEncoderPath" class="emby-input-iconbutton"><i class="md-icon">search</i></button>
</div>

View file

@ -4,8 +4,19 @@ define(["jQuery", "loading", "globalize", "dom"], function($, loading, globalize
function loadPage(page, config, systemInfo) {
Array.prototype.forEach.call(page.querySelectorAll(".chkDecodeCodec"), function(c) {
c.checked = -1 !== (config.HardwareDecodingCodecs || []).indexOf(c.getAttribute("data-codec"))
}), page.querySelector("#chkHardwareEncoding").checked = config.EnableHardwareEncoding, $("#selectVideoDecoder", page).val(config.HardwareAccelerationType), $("#selectThreadCount", page).val(config.EncodingThreadCount), $("#txtDownMixAudioBoost", page).val(config.DownMixAudioBoost), page.querySelector(".txtEncoderPath").value = config.EncoderAppPath || "", $("#txtTranscodingTempPath", page).val(config.TranscodingTempPath || ""), $("#txtVaapiDevice", page).val(config.VaapiDevice || ""), page.querySelector("#selectH264Preset").value = config.H264Preset || "", page.querySelector("#txtH264Crf").value = config.H264Crf || "", page.querySelector("#chkEnableSubtitleExtraction").checked = config.EnableSubtitleExtraction || !1, page.querySelector("#selectVideoDecoder").dispatchEvent(new CustomEvent("change", {
bubbles: !0
});
page.querySelector("#chkHardwareEncoding").checked = config.EnableHardwareEncoding;
$("#selectVideoDecoder", page).val(config.HardwareAccelerationType);
$("#selectThreadCount", page).val(config.EncodingThreadCount);
$("#txtDownMixAudioBoost", page).val(config.DownMixAudioBoost);
page.querySelector(".txtEncoderPath").value = config.EncoderAppPathDisplay || "";
$("#txtTranscodingTempPath", page).val(config.TranscodingTempPath || "");
$("#txtVaapiDevice", page).val(config.VaapiDevice || "");
page.querySelector("#selectH264Preset").value = config.H264Preset || "";
page.querySelector("#txtH264Crf").value = config.H264Crf || "";
page.querySelector("#chkEnableSubtitleExtraction").checked = config.EnableSubtitleExtraction || false;
page.querySelector("#selectVideoDecoder").dispatchEvent(new CustomEvent("change", {
bubbles: true
})), loading.hide()
}
@ -90,8 +101,8 @@ define(["jQuery", "loading", "globalize", "dom"], function($, loading, globalize
var page = this;
ApiClient.getNamedConfiguration("encoding").then(function(config) {
ApiClient.getSystemInfo().then(function(systemInfo) {
"External" == systemInfo.EncoderLocationType ? (page.querySelector(".fldEncoderPath").classList.add("hide"), page.querySelector(".txtEncoderPath").removeAttribute("required")) : (page.querySelector(".fldEncoderPath").classList.remove("hide"), page.querySelector(".txtEncoderPath").setAttribute("required", "required")), loadPage(page, config, systemInfo)
loadPage(page, config, systemInfo);
})
})
})
});
});