Add option for segment deletion and make throttle and segment seconds configurable

This commit is contained in:
Dominik 2022-11-14 10:35:49 +01:00
parent d9fef7f810
commit 364f2d448e
3 changed files with 30 additions and 0 deletions

View file

@ -316,6 +316,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 @@ import alert from '../../components/alert';
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
}));
@ -102,6 +105,9 @@ import alert from '../../components/alert';
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');
config.SegmentKeepSeconds = parseInt(form.querySelector('#txtSegmentKeepSeconds').value || '0');
config.HardwareDecodingCodecs = Array.prototype.map.call(Array.prototype.filter.call(form.querySelectorAll('.chkDecodeCodec'), function (c) {
return c.checked;
}), function (c) {

View file

@ -25,6 +25,12 @@
"AllowedRemoteAddressesHelp": "Comma separated list of IP addresses or IP/netmask entries for networks that will be allowed to connect remotely. If left blank, all remote addresses will be allowed.",
"AllowFfmpegThrottling": "Throttle Transcodes",
"AllowFfmpegThrottlingHelp": "When a transcode or remux gets far enough ahead from the current playback position, pause the process so it will consume less resources. This is most useful when watching without seeking often. Turn this off if you experience playback issues.",
"AllowSegmentDeletion": "Delete segments",
"AllowSegmentDeletionHelp": "Delete old segments after they have been sent to the client. This prevents having to store the entire transcoded file on disk. Will only work with throttling enabled. Turn this off if you experience playback issues.",
"LabelThrottleDelaySeconds": "Throttle after",
"LabelThrottleDelaySecondsHelp": "Time in seconds after which the transcoder will be throttled. Must be large enough for the client to maintain a healthy buffer. Only works if throttling is enabled.",
"LabelSegmentKeepSeconds": "Time to keep segments",
"LabelSegmentKeepSecondsHelp": "Time in seconds for which segments should be kept before they are overwritten. Must be greater than \"Throttle after\". Only works if segment deletion is enabled.",
"AllowHWTranscodingHelp": "Allow the tuner to transcode streams on the fly. This may help reduce transcoding required by the server.",
"AllowMediaConversion": "Allow media conversion",
"AllowMediaConversionHelp": "Grant or deny access to the convert media feature.",