Add transcoding port setting
This commit is contained in:
@@ -25,6 +25,8 @@ namespace Jellyfin.Plugin.Enigma2.Configuration
|
||||
|
||||
public bool TranscodedStream { get; set; }
|
||||
|
||||
public string TranscodingPort { get; set; }
|
||||
|
||||
public bool EnableDebugLogging { get; set; }
|
||||
|
||||
|
||||
@@ -47,6 +49,7 @@ namespace Jellyfin.Plugin.Enigma2.Configuration
|
||||
RecordingPath = "";
|
||||
|
||||
TranscodedStream = false;
|
||||
TranscodingPort = "8002";
|
||||
|
||||
EnableDebugLogging = false;
|
||||
}
|
||||
|
||||
@@ -136,6 +136,12 @@
|
||||
Request Transcoded Stream (h264, 720p, 1Mpbs and mp4 as default)
|
||||
</div>
|
||||
</div>
|
||||
<div class="inputContainer">
|
||||
<input is="emby-input" id="txtTranscodingPort" type="text" label="Enigma2 transcoding port:" />
|
||||
<div class="fieldDescription">
|
||||
The Transcoding port of your receiver eg. 8002
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<label class="checkboxContainer">
|
||||
<input is="emby-checkbox" type="checkbox" id="chkDebugLogging" />
|
||||
@@ -174,6 +180,7 @@
|
||||
document.getElementById('txtPiconsPath').value = config.PiconsPath || "";
|
||||
document.getElementById('txtRecordingPath').value = config.RecordingPath || "";
|
||||
document.getElementById('chkTranscodedStream').checked = config.TranscodedStream || false;
|
||||
document.getElementById('txtTranscodingPort').value = config.TranscodingPort || "";
|
||||
document.getElementById('chkDebugLogging').checked = config.EnableDebugLogging || false;
|
||||
|
||||
Dashboard.hideLoadingMsg();
|
||||
@@ -199,6 +206,7 @@
|
||||
config.PiconsPath = document.getElementById('txtPiconsPath').value;
|
||||
config.RecordingPath = document.getElementById('txtRecordingPath').value;
|
||||
config.TranscodedStream = document.getElementById('chkTranscodedStream').checked;
|
||||
config.TranscodingPort = document.getElementById('txtTranscodingPort').value;
|
||||
config.EnableDebugLogging = document.getElementById('chkDebugLogging').checked;
|
||||
|
||||
ApiClient.updatePluginConfiguration(Enigma2ConfigurationPage.pluginUniqueId, config).then(Dashboard.processPluginConfigurationUpdateResult);
|
||||
|
||||
@@ -101,6 +101,12 @@ namespace Jellyfin.Plugin.Enigma2
|
||||
throw new InvalidOperationException("Enigma2 Streaming Port must be configured.");
|
||||
}
|
||||
|
||||
if (config.TranscodedStream && string.IsNullOrEmpty(config.TranscodingPort))
|
||||
{
|
||||
_logger.LogError("[Enigma2] Transcoding Port must be configured.");
|
||||
throw new InvalidOperationException("Enigma2 Transcoding Port must be configured.");
|
||||
}
|
||||
|
||||
if (string.IsNullOrEmpty(config.WebInterfacePort))
|
||||
{
|
||||
_logger.LogError("[Enigma2] Web Interface Port must be configured.");
|
||||
@@ -1128,7 +1134,14 @@ namespace Jellyfin.Plugin.Enigma2
|
||||
protocol = "https";
|
||||
}
|
||||
|
||||
var baseUrl = protocol + "://" + Plugin.Instance.Configuration.HostName + ":" + Plugin.Instance.Configuration.StreamingPort;
|
||||
var streamingPort = Plugin.Instance.Configuration.StreamingPort;
|
||||
|
||||
if (Plugin.Instance.Configuration.TranscodedStream)
|
||||
{
|
||||
streamingPort = Plugin.Instance.Configuration.TranscodingPort;
|
||||
}
|
||||
|
||||
var baseUrl = protocol + "://" + Plugin.Instance.Configuration.HostName + ":" + streamingPort;
|
||||
|
||||
//check if we need to zap to channel - single tuner
|
||||
if (Plugin.Instance.Configuration.ZapToChannel)
|
||||
@@ -1138,7 +1151,7 @@ namespace Jellyfin.Plugin.Enigma2
|
||||
|
||||
if (Plugin.Instance.Configuration.UseLoginForStreams && !string.IsNullOrEmpty(Plugin.Instance.Configuration.WebInterfaceUsername))
|
||||
{
|
||||
baseUrl = protocol + "://" + Plugin.Instance.Configuration.WebInterfaceUsername + ":" + Plugin.Instance.Configuration.WebInterfacePassword + "@" + Plugin.Instance.Configuration.HostName + ":" + Plugin.Instance.Configuration.StreamingPort;
|
||||
baseUrl = protocol + "://" + Plugin.Instance.Configuration.WebInterfaceUsername + ":" + Plugin.Instance.Configuration.WebInterfacePassword + "@" + Plugin.Instance.Configuration.HostName + ":" + streamingPort;
|
||||
}
|
||||
|
||||
var trancodingUrl = "";
|
||||
|
||||
Reference in New Issue
Block a user