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:
commit
7bd77a5ce1
2 changed files with 17 additions and 6 deletions
|
@ -91,10 +91,10 @@
|
||||||
<div class="fieldDescription">${LabelTranscodingThreadCountHelp}</div>
|
<div class="fieldDescription">${LabelTranscodingThreadCountHelp}</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="inputContainer fldEncoderPath hide">
|
<div class="inputContainer fldEncoderPath">
|
||||||
<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" class="txtEncoderPath" label="${LabelffmpegPath}" autocomplete="off" required />
|
<input is="emby-input" class="txtEncoderPath" label="${LabelffmpegPath}" autocomplete="off" />
|
||||||
</div>
|
</div>
|
||||||
<button type="button" is="paper-icon-button-light" id="btnSelectEncoderPath" class="emby-input-iconbutton"><i class="md-icon">search</i></button>
|
<button type="button" is="paper-icon-button-light" id="btnSelectEncoderPath" class="emby-input-iconbutton"><i class="md-icon">search</i></button>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -4,8 +4,19 @@ define(["jQuery", "loading", "globalize", "dom"], function($, loading, globalize
|
||||||
function loadPage(page, config, systemInfo) {
|
function loadPage(page, config, systemInfo) {
|
||||||
Array.prototype.forEach.call(page.querySelectorAll(".chkDecodeCodec"), function(c) {
|
Array.prototype.forEach.call(page.querySelectorAll(".chkDecodeCodec"), function(c) {
|
||||||
c.checked = -1 !== (config.HardwareDecodingCodecs || []).indexOf(c.getAttribute("data-codec"))
|
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()
|
})), loading.hide()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -90,8 +101,8 @@ define(["jQuery", "loading", "globalize", "dom"], function($, loading, globalize
|
||||||
var page = this;
|
var page = this;
|
||||||
ApiClient.getNamedConfiguration("encoding").then(function(config) {
|
ApiClient.getNamedConfiguration("encoding").then(function(config) {
|
||||||
ApiClient.getSystemInfo().then(function(systemInfo) {
|
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);
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue