1
0
Fork 0
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:
gnattu 2024-08-28 18:04:47 +08:00
parent 143fac6ac6
commit 20360b5786
3 changed files with 54 additions and 0 deletions

View file

@ -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" />

View file

@ -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 {

View file

@ -28,8 +28,10 @@
"AllowSubtitleManagement": "Allow this user to edit subtitles",
"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 fewer resources. This is most useful when watching without seeking often. Turn this off if you experience playback issues.",
"AllowFmp4TranscodingContainerHelp": "Allow fmp4 transcoding container for this tuner to enable HEVC and HDR contents. Not all tuners are compatible with this container. Disable this if you experience playback issues.",
"AllowSegmentDeletion": "Delete segments",
"AllowSegmentDeletionHelp": "Delete old segments after they have been downloaded by the client. This prevents having to store the entire transcoded file on disk. Turn this off if you experience playback issues.",
"AllowStreamSharingHelp": "Allow Jellyfin to duplicate the mpegts stream from tuner and share this duplicated stream to its clients. This is useful when the tuner has total stream count limit but may also cause playback issues.",
"Alternate" : "Alternate",
"AlternateDVD" : "Alternate DVD",
"LabelThrottleDelaySeconds": "Throttle after",
@ -313,6 +315,7 @@
"ExtractChapterImagesHelp": "Extracting chapter images will allow clients to display graphical scene selection menus. The process can be slow, resource intensive, and may require several gigabytes of space. It runs when videos are discovered, and also as a nightly scheduled task. The schedule is configurable in the scheduled tasks area. It is not recommended to run this task during peak usage hours.",
"ExtraLarge": "Extra Large",
"Extras": "Extras",
"FallbackMaxStreamingBitrateHelp": "The maximum streaming bitrate is used as a fallback when ffprobe is unable to determine the source stream bitrate. This helps prevent clients from requesting an excessively high transcoding bitrate, which could cause the player to fail and overload the encoder.",
"FastForward": "Fast-forward",
"Favorite": "Favorite",
"Favorites": "Favorites",
@ -567,9 +570,11 @@
"LabelAllowContentWithTags": "Allow items with tags",
"LabelAllowedRemoteAddresses": "Remote IP address filter",
"LabelAllowedRemoteAddressesMode": "Remote IP address filter mode",
"LabelAllowFmp4TranscodingContainer": "Allow fmp4 transcoding container",
"LabelAllowHWTranscoding": "Allow hardware transcoding",
"LabelAlwaysRemuxFlacAudioFiles": "Always remux FLAC audio files",
"LabelAlwaysRemuxMp3AudioFiles": "Always remux MP3 audio files",
"LabelAllowStreamSharing": "Allow stream sharing",
"LabelAppName": "App name",
"LabelAppNameExample": "A human readable name for identifying API keys. This setting will not affect functionality.",
"LabelArtists": "Artists",
@ -688,6 +693,7 @@
"LabelExtractChaptersDuringLibraryScan": "Extract chapter images during the library scan",
"LabelExtractChaptersDuringLibraryScanHelp": "Generate chapter images when videos are imported during the library scan. Otherwise, they will be extracted during the chapter images scheduled task, allowing the regular library scan to complete faster.",
"LabelFailed": "Failed",
"LabelFallbackMaxStreamingBitrate": "Fallback max stream bitrate (Mbps)",
"LabelffmpegPath": "FFmpeg path",
"LabelffmpegPathHelp": "The path to the FFmpeg application file or folder containing FFmpeg.",
"LabelFileOrUrl": "File or URL",