mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Make Live TV compatibility profiles customizable
This commit is contained in:
parent
143fac6ac6
commit
20360b5786
3 changed files with 54 additions and 0 deletions
|
@ -38,6 +38,11 @@
|
|||
<div class="fieldDescription">${SimultaneousConnectionLimitHelp}</div>
|
||||
</div>
|
||||
|
||||
<div class="inputContainer fldFallbackMaxStreamingBitrate hide">
|
||||
<input is="emby-input" type="number" pattern="[0-9]*" required="required" min="0" step="1" class="txtFallbackMaxStreamingBitrate" label="${LabelFallbackMaxStreamingBitrate}" autocomplete="off" value="30" />
|
||||
<div class="fieldDescription">${FallbackMaxStreamingBitrateHelp}</div>
|
||||
</div>
|
||||
|
||||
<div class="checkboxContainer checkboxContainer-withDescription fldFavorites hide">
|
||||
<label>
|
||||
<input type="checkbox" is="emby-checkbox" class="chkFavorite" />
|
||||
|
@ -54,6 +59,22 @@
|
|||
<div class="fieldDescription checkboxFieldDescription">${AllowHWTranscodingHelp}</div>
|
||||
</div>
|
||||
|
||||
<div class="checkboxContainer checkboxContainer-withDescription fldFmp4Container hide">
|
||||
<label>
|
||||
<input type="checkbox" is="emby-checkbox" class="chkFmp4Container" />
|
||||
<span>${LabelAllowFmp4TranscodingContainer}</span>
|
||||
</label>
|
||||
<div class="fieldDescription checkboxFieldDescription">${AllowFmp4TranscodingContainerHelp}</div>
|
||||
</div>
|
||||
|
||||
<div class="checkboxContainer checkboxContainer-withDescription fldStreamSharing hide">
|
||||
<label>
|
||||
<input type="checkbox" is="emby-checkbox" class="chkStreamSharing" checked />
|
||||
<span>${LabelAllowStreamSharing}</span>
|
||||
</label>
|
||||
<div class="fieldDescription checkboxFieldDescription">${AllowStreamSharingHelp}</div>
|
||||
</div>
|
||||
|
||||
<div class="checkboxContainer checkboxContainer-withDescription fldStreamLoop hide">
|
||||
<label>
|
||||
<input type="checkbox" is="emby-checkbox" class="chkStreamLoop" />
|
||||
|
|
|
@ -61,7 +61,10 @@ function fillTunerHostInfo(view, info) {
|
|||
view.querySelector('.chkFavorite').checked = info.ImportFavoritesOnly;
|
||||
view.querySelector('.chkTranscode').checked = info.AllowHWTranscoding;
|
||||
view.querySelector('.chkStreamLoop').checked = info.EnableStreamLooping;
|
||||
view.querySelector('.chkFmp4Container').checked = info.AllowFmp4TranscodingContainer;
|
||||
view.querySelector('.chkStreamSharing').checked = info.AllowStreamSharing;
|
||||
view.querySelector('.chkIgnoreDts').checked = info.IgnoreDts;
|
||||
view.querySelector('.txtFallbackMaxStreamingBitrate').value = info.FallbackMaxStreamingBitrate / 1e6 || '30';
|
||||
view.querySelector('.txtTunerCount').value = info.TunerCount || '0';
|
||||
}
|
||||
|
||||
|
@ -74,8 +77,11 @@ function submitForm(page) {
|
|||
FriendlyName: page.querySelector('.txtFriendlyName').value || null,
|
||||
DeviceId: page.querySelector('.fldDeviceId').value || null,
|
||||
TunerCount: page.querySelector('.txtTunerCount').value || 0,
|
||||
FallbackMaxStreamingBitrate: parseInt(1e6 * parseFloat(page.querySelector('.txtFallbackMaxStreamingBitrate').value || '30'), 10),
|
||||
ImportFavoritesOnly: page.querySelector('.chkFavorite').checked,
|
||||
AllowHWTranscoding: page.querySelector('.chkTranscode').checked,
|
||||
AllowFmp4TranscodingContainer: page.querySelector('.chkFmp4Container').checked,
|
||||
AllowStreamSharing: page.querySelector('.chkStreamSharing').checked,
|
||||
EnableStreamLooping: page.querySelector('.chkStreamLoop').checked,
|
||||
IgnoreDts: page.querySelector('.chkIgnoreDts').checked
|
||||
};
|
||||
|
@ -125,6 +131,9 @@ function onTypeChange() {
|
|||
const supportsIgnoreDts = value === 'm3u';
|
||||
const supportsTunerCount = value === 'm3u';
|
||||
const supportsUserAgent = value === 'm3u';
|
||||
const supportsFmp4Container = value === 'm3u';
|
||||
const supportsStreamSharing = value === 'm3u';
|
||||
const supportsFallbackBitrate = value === 'm3u' || value === 'hdhomerun';
|
||||
const suppportsSubmit = value !== 'other';
|
||||
const supportsSelectablePath = supportsTunerFileOrUrl;
|
||||
const txtDevicePath = view.querySelector('.txtDevicePath');
|
||||
|
@ -165,6 +174,24 @@ function onTypeChange() {
|
|||
view.querySelector('.fldTranscode').classList.add('hide');
|
||||
}
|
||||
|
||||
if (supportsFmp4Container) {
|
||||
view.querySelector('.fldFmp4Container').classList.remove('hide');
|
||||
} else {
|
||||
view.querySelector('.fldFmp4Container').classList.add('hide');
|
||||
}
|
||||
|
||||
if (supportsStreamSharing) {
|
||||
view.querySelector('.fldStreamSharing').classList.remove('hide');
|
||||
} else {
|
||||
view.querySelector('.fldStreamSharing').classList.add('hide');
|
||||
}
|
||||
|
||||
if (supportsFallbackBitrate) {
|
||||
view.querySelector('.fldFallbackMaxStreamingBitrate').classList.remove('hide');
|
||||
} else {
|
||||
view.querySelector('.fldFallbackMaxStreamingBitrate').classList.add('hide');
|
||||
}
|
||||
|
||||
if (supportsStreamLooping) {
|
||||
view.querySelector('.fldStreamLoop').classList.remove('hide');
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue