Merge pull request #13 from tiagoqpinto/jellyfin
Add Transcoding option to settings
This commit is contained in:
Vendored
+41
@@ -0,0 +1,41 @@
|
||||
{
|
||||
"version": "2.0.0",
|
||||
"tasks": [
|
||||
{
|
||||
"label": "build",
|
||||
"command": "dotnet",
|
||||
"type": "process",
|
||||
"args": [
|
||||
"build",
|
||||
"${workspaceFolder}/Jellyfin.Plugin.Enigma2/Jellyfin.Plugin.Enigma2.csproj",
|
||||
"/property:GenerateFullPaths=true",
|
||||
"/consoleloggerparameters:NoSummary"
|
||||
],
|
||||
"problemMatcher": "$msCompile"
|
||||
},
|
||||
{
|
||||
"label": "publish",
|
||||
"command": "dotnet",
|
||||
"type": "process",
|
||||
"args": [
|
||||
"publish",
|
||||
"${workspaceFolder}/Jellyfin.Plugin.Enigma2/Jellyfin.Plugin.Enigma2.csproj",
|
||||
"/property:GenerateFullPaths=true",
|
||||
"/consoleloggerparameters:NoSummary"
|
||||
],
|
||||
"problemMatcher": "$msCompile"
|
||||
},
|
||||
{
|
||||
"label": "watch",
|
||||
"command": "dotnet",
|
||||
"type": "process",
|
||||
"args": [
|
||||
"watch",
|
||||
"run",
|
||||
"--project",
|
||||
"${workspaceFolder}/Jellyfin.Plugin.Enigma2/Jellyfin.Plugin.Enigma2.csproj"
|
||||
],
|
||||
"problemMatcher": "$msCompile"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -23,6 +23,10 @@ namespace Jellyfin.Plugin.Enigma2.Configuration
|
||||
|
||||
public string RecordingPath { get; set; }
|
||||
|
||||
public bool TranscodedStream { get; set; }
|
||||
|
||||
public string TranscodingPort { get; set; }
|
||||
|
||||
public bool EnableDebugLogging { get; set; }
|
||||
|
||||
|
||||
@@ -44,6 +48,9 @@ namespace Jellyfin.Plugin.Enigma2.Configuration
|
||||
|
||||
RecordingPath = "";
|
||||
|
||||
TranscodedStream = false;
|
||||
TranscodingPort = "8002";
|
||||
|
||||
EnableDebugLogging = false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -127,6 +127,22 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="checkboxContainer checkboxContainer-withDescription">
|
||||
<label>
|
||||
<input is="emby-checkbox" type="checkbox" id="chkTranscodedStream" />
|
||||
<span>Request Transcoded Stream</span>
|
||||
</label>
|
||||
<div class="fieldDescription checkboxFieldDescription">
|
||||
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" />
|
||||
<span>Enable Enigma2 debug logging</span>
|
||||
@@ -163,6 +179,8 @@
|
||||
document.getElementById('chkFetchPiconsFromWebInterface').checked = config.FetchPiconsFromWebInterface || false;
|
||||
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();
|
||||
@@ -187,6 +205,8 @@
|
||||
config.FetchPiconsFromWebInterface = document.getElementById('chkFetchPiconsFromWebInterface').checked;
|
||||
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);
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFrameworks>net6.0</TargetFrameworks>
|
||||
<AssemblyVersion>5.0.0.0</AssemblyVersion>
|
||||
<FileVersion>5.0.0.0</FileVersion>
|
||||
<AssemblyVersion>5.0.1.0</AssemblyVersion>
|
||||
<FileVersion>5.0.1.0</FileVersion>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Release|net6.0|AnyCPU'">
|
||||
|
||||
@@ -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.");
|
||||
@@ -552,6 +558,7 @@ namespace Jellyfin.Plugin.Enigma2
|
||||
/// <returns>Task{IEnumerable{RecordingInfo}}</returns>
|
||||
public async Task<IEnumerable<RecordingInfo>> GetRecordingsAsync(CancellationToken cancellationToken)
|
||||
{
|
||||
await Task.Delay(0); //to avoid await warnings
|
||||
return new List<RecordingInfo>();
|
||||
}
|
||||
|
||||
@@ -1127,8 +1134,15 @@ 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)
|
||||
{
|
||||
@@ -1137,11 +1151,17 @@ 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 = "";
|
||||
if (Plugin.Instance.Configuration.TranscodedStream)
|
||||
{
|
||||
trancodingUrl = "?bitrate=1000000?width=1280?height=720?vcodec=h264?aspectratio=2?interlaced=0.mp4";
|
||||
}
|
||||
|
||||
_liveStreams++;
|
||||
var streamUrl = string.Format("{0}/{1}", baseUrl, channelOid);
|
||||
var streamUrl = string.Format("{0}/{1}{2}", baseUrl, channelOid, trancodingUrl);
|
||||
UtilsHelper.DebugInformation(_logger, string.Format("[Enigma2] GetChannelStream url: {0}", streamUrl));
|
||||
|
||||
return new MediaSourceInfo
|
||||
@@ -1258,6 +1278,7 @@ namespace Jellyfin.Plugin.Enigma2
|
||||
{
|
||||
_logger.LogInformation("[Enigma2] Start GetNewTimerDefaultsAsync");
|
||||
|
||||
await Task.Delay(0); //to avoid await warnings
|
||||
var seriesTimerInfo = new SeriesTimerInfo();
|
||||
|
||||
return seriesTimerInfo;
|
||||
@@ -1553,12 +1574,14 @@ namespace Jellyfin.Plugin.Enigma2
|
||||
|
||||
public async Task<MediaSourceInfo> GetRecordingStream(string recordingId, string mediaSourceId, CancellationToken cancellationToken)
|
||||
{
|
||||
await Task.Delay(0); //to avoid await warnings
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
|
||||
public async Task CloseLiveStream(string id, CancellationToken cancellationToken)
|
||||
{
|
||||
await Task.Delay(0); //to avoid await warnings
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
@@ -1589,7 +1612,7 @@ namespace Jellyfin.Plugin.Enigma2
|
||||
public async Task<IEnumerable<SeriesTimerInfo>> GetSeriesTimersAsync(CancellationToken cancellationToken)
|
||||
{
|
||||
_logger.LogInformation("[Enigma2] Start GetSeriesTimersAsync");
|
||||
|
||||
await Task.Delay(0); //to avoid await warnings
|
||||
var seriesTimerInfo = new List<SeriesTimerInfo>();
|
||||
return seriesTimerInfo;
|
||||
}
|
||||
@@ -1603,6 +1626,7 @@ namespace Jellyfin.Plugin.Enigma2
|
||||
/// <returns></returns>
|
||||
public async Task CreateSeriesTimerAsync(SeriesTimerInfo info, CancellationToken cancellationToken)
|
||||
{
|
||||
await Task.Delay(0); //to avoid await warnings
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
@@ -1615,6 +1639,7 @@ namespace Jellyfin.Plugin.Enigma2
|
||||
/// <returns></returns>
|
||||
public async Task UpdateSeriesTimerAsync(SeriesTimerInfo info, CancellationToken cancellationToken)
|
||||
{
|
||||
await Task.Delay(0); //to avoid await warnings
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
@@ -1627,6 +1652,7 @@ namespace Jellyfin.Plugin.Enigma2
|
||||
/// <returns></returns>
|
||||
public async Task UpdateTimerAsync(TimerInfo info, CancellationToken cancellationToken)
|
||||
{
|
||||
await Task.Delay(0); //to avoid await warnings
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
@@ -1639,27 +1665,11 @@ namespace Jellyfin.Plugin.Enigma2
|
||||
/// <returns></returns>
|
||||
public async Task CancelSeriesTimerAsync(string timerId, CancellationToken cancellationToken)
|
||||
{
|
||||
await Task.Delay(0); //to avoid await warnings
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Get the DefaultScheduleSettings
|
||||
/// </summary>
|
||||
/// <param name="cancellationToken">The CancellationToken</param>
|
||||
/// <returns></returns>
|
||||
//private async Task<ScheduleSettings> GetDefaultScheduleSettings(CancellationToken cancellationToken)
|
||||
//{
|
||||
// throw new NotImplementedException();
|
||||
//}
|
||||
|
||||
|
||||
public event EventHandler DataSourceChanged;
|
||||
|
||||
|
||||
public event EventHandler<RecordingStatusChangedEventArgs> RecordingStatusChanged;
|
||||
|
||||
|
||||
public Task ResetTuner(string id, CancellationToken cancellationToken)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
|
||||
+1
-1
@@ -8,7 +8,7 @@ guid: "193f29f9-ea6c-4595-a6f6-55e79d7c590a"
|
||||
# The version of the plugin, starting at 1. Note that the AssemblyVersion
|
||||
# and FileVersion flags in the `.csproj` file must have two additional
|
||||
# fiels, e.g. 1.0.0 to be built correctly.
|
||||
version: "5.0.0.0" # Please increment with each pull request
|
||||
version: "5.0.1.0" # Please increment with each pull request
|
||||
|
||||
# The supported Jellyfin version, usually the earliest binary-compatible
|
||||
# version. Based on the Jellyfin components from NuGet.
|
||||
|
||||
Reference in New Issue
Block a user