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

Merge pull request #4170 from DomiStyle/segment-deletion

Add encoder settings for ffmpeg's segment deletion
This commit is contained in:
Bill Thornton 2023-07-14 11:35:55 -04:00 committed by GitHub
commit d8c25b4594
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 31 additions and 0 deletions

View file

@ -335,6 +335,24 @@
<div class="fieldDescription checkboxFieldDescription">${AllowFfmpegThrottlingHelp}</div>
</div>
<div class="checkboxContainer checkboxContainer-withDescription">
<label>
<input is="emby-checkbox" type="checkbox" id="chkEnableSegmentDeletion" />
<span>${AllowSegmentDeletion}</span>
</label>
<div class="fieldDescription checkboxFieldDescription">${AllowSegmentDeletionHelp}</div>
</div>
<div class="inputContainer">
<input is="emby-input" type="number" id="txtThrottleDelaySeconds" pattern="[0-9]*" min="10" max="3600" step="1" label="${LabelThrottleDelaySeconds}" />
<div class="fieldDescription">${LabelThrottleDelaySecondsHelp}</div>
</div>
<div class="inputContainer">
<input is="emby-input" type="number" id="txtSegmentKeepSeconds" pattern="[0-9]*" min="15" max="3600" step="1" label="${LabelSegmentKeepSeconds}" />
<div class="fieldDescription">${LabelSegmentKeepSecondsHelp}</div>
</div>
<div>
<button is="emby-button" type="submit" class="raised button-submit block">
<span>${Save}</span>

View file

@ -46,6 +46,9 @@ function loadPage(page, config, systemInfo) {
page.querySelector('#chkDoubleRateDeinterlacing').checked = config.DeinterlaceDoubleRate;
page.querySelector('#chkEnableSubtitleExtraction').checked = config.EnableSubtitleExtraction || false;
page.querySelector('#chkEnableThrottling').checked = config.EnableThrottling || false;
page.querySelector('#chkEnableSegmentDeletion').checked = config.EnableSegmentDeletion || false;
page.querySelector('#txtThrottleDelaySeconds').value = config.ThrottleDelaySeconds || '';
page.querySelector('#txtSegmentKeepSeconds').value = config.SegmentKeepSeconds || '';
page.querySelector('#selectVideoDecoder').dispatchEvent(new CustomEvent('change', {
bubbles: true
}));
@ -104,6 +107,9 @@ function onSubmit() {
config.DeinterlaceDoubleRate = form.querySelector('#chkDoubleRateDeinterlacing').checked;
config.EnableSubtitleExtraction = form.querySelector('#chkEnableSubtitleExtraction').checked;
config.EnableThrottling = form.querySelector('#chkEnableThrottling').checked;
config.EnableSegmentDeletion = form.querySelector('#chkEnableSegmentDeletion').checked;
config.ThrottleDelaySeconds = parseInt(form.querySelector('#txtThrottleDelaySeconds').value || '0', 10);
config.SegmentKeepSeconds = parseInt(form.querySelector('#txtSegmentKeepSeconds').value || '0', 10);
config.HardwareDecodingCodecs = Array.prototype.map.call(Array.prototype.filter.call(form.querySelectorAll('.chkDecodeCodec'), function (c) {
return c.checked;
}), function (c) {