Skip to content

Commit 7bd77a5

Browse files
Merge pull request #128 from ploughpuff/ffmpeg
Always show FFmpeg path in Transcoding page
2 parents 44e16c7 + 6565ec4 commit 7bd77a5

File tree

2 files changed

+17
-6
lines changed

2 files changed

+17
-6
lines changed

src/encodingsettings.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -91,10 +91,10 @@ <h3 class="checkboxListLabel">${LabelEnableHardwareDecodingFor}</h3>
9191
<div class="fieldDescription">${LabelTranscodingThreadCountHelp}</div>
9292
</div>
9393

94-
<div class="inputContainer fldEncoderPath hide">
94+
<div class="inputContainer fldEncoderPath">
9595
<div style="display: flex; align-items: center;">
9696
<div style="flex-grow:1;">
97-
<input is="emby-input" class="txtEncoderPath" label="${LabelffmpegPath}" autocomplete="off" required />
97+
<input is="emby-input" class="txtEncoderPath" label="${LabelffmpegPath}" autocomplete="off" />
9898
</div>
9999
<button type="button" is="paper-icon-button-light" id="btnSelectEncoderPath" class="emby-input-iconbutton"><i class="md-icon">search</i></button>
100100
</div>

src/scripts/encodingsettings.js

+15-4
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,19 @@ define(["jQuery", "loading", "globalize", "dom"], function($, loading, globalize
44
function loadPage(page, config, systemInfo) {
55
Array.prototype.forEach.call(page.querySelectorAll(".chkDecodeCodec"), function(c) {
66
c.checked = -1 !== (config.HardwareDecodingCodecs || []).indexOf(c.getAttribute("data-codec"))
7-
}), 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", {
8-
bubbles: !0
7+
});
8+
page.querySelector("#chkHardwareEncoding").checked = config.EnableHardwareEncoding;
9+
$("#selectVideoDecoder", page).val(config.HardwareAccelerationType);
10+
$("#selectThreadCount", page).val(config.EncodingThreadCount);
11+
$("#txtDownMixAudioBoost", page).val(config.DownMixAudioBoost);
12+
page.querySelector(".txtEncoderPath").value = config.EncoderAppPathDisplay || "";
13+
$("#txtTranscodingTempPath", page).val(config.TranscodingTempPath || "");
14+
$("#txtVaapiDevice", page).val(config.VaapiDevice || "");
15+
page.querySelector("#selectH264Preset").value = config.H264Preset || "";
16+
page.querySelector("#txtH264Crf").value = config.H264Crf || "";
17+
page.querySelector("#chkEnableSubtitleExtraction").checked = config.EnableSubtitleExtraction || false;
18+
page.querySelector("#selectVideoDecoder").dispatchEvent(new CustomEvent("change", {
19+
bubbles: true
920
})), loading.hide()
1021
}
1122

@@ -90,8 +101,8 @@ define(["jQuery", "loading", "globalize", "dom"], function($, loading, globalize
90101
var page = this;
91102
ApiClient.getNamedConfiguration("encoding").then(function(config) {
92103
ApiClient.getSystemInfo().then(function(systemInfo) {
93-
"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)
104+
loadPage(page, config, systemInfo);
94105
})
95106
})
96107
})
97-
});
108+
});

0 commit comments

Comments
 (0)