Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a2e9686898 |
@@ -1,9 +1,9 @@
|
|||||||
|
|
||||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||||
# Visual Studio Version 16
|
# Visual Studio Version 17
|
||||||
VisualStudioVersion = 16.0.31105.61
|
VisualStudioVersion = 17.2.32616.157
|
||||||
MinimumVisualStudioVersion = 10.0.40219.1
|
MinimumVisualStudioVersion = 10.0.40219.1
|
||||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MediaBrowser.Plugins.VuPlus", "MediaBrowser.Plugins.VuPlus\MediaBrowser.Plugins.VuPlus.csproj", "{52B1ABDF-09C1-450E-B808-BBA0A9C19848}"
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Jellyfin.Plugin.Enigma2", "Jellyfin.Plugin.Enigma2\Jellyfin.Plugin.Enigma2.csproj", "{52B1ABDF-09C1-450E-B808-BBA0A9C19848}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{A968FB09-8732-407C-8748-6DB383EB5D91}"
|
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{A968FB09-8732-407C-8748-6DB383EB5D91}"
|
||||||
ProjectSection(SolutionItems) = preProject
|
ProjectSection(SolutionItems) = preProject
|
||||||
+6
-3
@@ -1,6 +1,6 @@
|
|||||||
using MediaBrowser.Model.Plugins;
|
using MediaBrowser.Model.Plugins;
|
||||||
|
|
||||||
namespace MediaBrowser.Plugins.VuPlus.Configuration
|
namespace Jellyfin.Plugin.Enigma2.Configuration
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Class PluginConfiguration
|
/// Class PluginConfiguration
|
||||||
@@ -12,7 +12,9 @@ namespace MediaBrowser.Plugins.VuPlus.Configuration
|
|||||||
public string WebInterfacePort { get; set; }
|
public string WebInterfacePort { get; set; }
|
||||||
public string WebInterfaceUsername { get; set; }
|
public string WebInterfaceUsername { get; set; }
|
||||||
public string WebInterfacePassword { get; set; }
|
public string WebInterfacePassword { get; set; }
|
||||||
|
public bool UseLoginForStreams { get; set; }
|
||||||
public bool UseSecureHTTPS { get; set; }
|
public bool UseSecureHTTPS { get; set; }
|
||||||
|
public bool UseSecureHTTPSForStreams { get; set; }
|
||||||
public bool OnlyOneBouquet { get; set; }
|
public bool OnlyOneBouquet { get; set; }
|
||||||
public string TVBouquet { get; set; }
|
public string TVBouquet { get; set; }
|
||||||
public bool ZapToChannel { get; set; }
|
public bool ZapToChannel { get; set; }
|
||||||
@@ -26,12 +28,14 @@ namespace MediaBrowser.Plugins.VuPlus.Configuration
|
|||||||
|
|
||||||
public PluginConfiguration()
|
public PluginConfiguration()
|
||||||
{
|
{
|
||||||
HostName = "http://localhost";
|
HostName = "localhost";
|
||||||
StreamingPort = "8001";
|
StreamingPort = "8001";
|
||||||
WebInterfacePort = "8000";
|
WebInterfacePort = "8000";
|
||||||
WebInterfaceUsername = "";
|
WebInterfaceUsername = "";
|
||||||
WebInterfacePassword = "";
|
WebInterfacePassword = "";
|
||||||
|
UseLoginForStreams = false;
|
||||||
UseSecureHTTPS = false;
|
UseSecureHTTPS = false;
|
||||||
|
UseSecureHTTPSForStreams = false;
|
||||||
OnlyOneBouquet = true;
|
OnlyOneBouquet = true;
|
||||||
TVBouquet = "Favourites (TV)";
|
TVBouquet = "Favourites (TV)";
|
||||||
ZapToChannel = false;
|
ZapToChannel = false;
|
||||||
@@ -41,7 +45,6 @@ namespace MediaBrowser.Plugins.VuPlus.Configuration
|
|||||||
RecordingPath = "";
|
RecordingPath = "";
|
||||||
|
|
||||||
EnableDebugLogging = false;
|
EnableDebugLogging = false;
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
+47
-23
@@ -1,46 +1,56 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>Vu+</title>
|
<title>Enigma2</title>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div data-role="page" id="VuPlusConfigurationPage" class="page type-interior pluginConfigurationPage VuPlusConfigurationPage" data-require="emby-button,emby-checkbox,emby-input">
|
<div data-role="page" id="Enigma2ConfigurationPage" class="page type-interior pluginConfigurationPage Enigma2ConfigurationPage" data-require="emby-button,emby-checkbox,emby-input">
|
||||||
|
|
||||||
<div data-role="content">
|
<div data-role="content">
|
||||||
<div class="content-primary">
|
<div class="content-primary">
|
||||||
|
|
||||||
<h1>VuPlus</h1>
|
<h1>Enigma2</h1>
|
||||||
|
|
||||||
<form id="VuPlusConfigurationForm" class="VuPlusConfigurationForm">
|
<form id="Enigma2ConfigurationForm" class="Enigma2ConfigurationForm">
|
||||||
|
|
||||||
<div class="inputContainer">
|
<div class="inputContainer">
|
||||||
<input is="emby-input" id="txtHostName" type="text" label="Vu+ hostname or ip address:" />
|
<input is="emby-input" id="txtHostName" type="text" label="Enigma2 hostname or ip address:" />
|
||||||
<div class="fieldDescription">
|
<div class="fieldDescription">
|
||||||
The host name (address) or ip address of your receiver
|
The host name (address) or ip address of your receiver
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="inputContainer">
|
<div class="inputContainer">
|
||||||
<input is="emby-input" id="txtStreamingPort" type="text" label="Vu+ streaming port:" />
|
<input is="emby-input" id="txtStreamingPort" type="text" label="Enigma2 streaming port:" />
|
||||||
<div class="fieldDescription">
|
<div class="fieldDescription">
|
||||||
The Streaming port of your receiver eg. 8001
|
The Streaming port of your receiver eg. 8001
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="inputContainer">
|
<div class="inputContainer">
|
||||||
<input is="emby-input" id="txtWebInterfacePort" type="text" label="Vu+ Web Interface port:" />
|
<input is="emby-input" id="txtWebInterfacePort" type="text" label="Enigma2 Web Interface port:" />
|
||||||
<div class="fieldDescription">
|
<div class="fieldDescription">
|
||||||
The web Interface port of your receiver eg. 8000
|
The web interface port of your receiver eg. 8000
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="inputContainer">
|
<div class="inputContainer">
|
||||||
<input is="emby-input" id="txtWebInterfaceUsername" type="text" label="Vu+ Web Interface username:" />
|
<input is="emby-input" id="txtWebInterfaceUsername" type="text" label="Enigma2 Web Interface username:" />
|
||||||
<div class="fieldDescription">
|
<div class="fieldDescription">
|
||||||
The web Interface username of your receiver (optional)
|
The web interface username of your receiver (optional)
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="inputContainer">
|
<div class="inputContainer">
|
||||||
<input is="emby-input" id="txtWebInterfacePassword" type="text" label="Vu+ Web Interface password:" />
|
<input is="emby-input" id="txtWebInterfacePassword" type="password" label="Enigma2 Web Interface password:" />
|
||||||
<div class="fieldDescription">
|
<div class="fieldDescription">
|
||||||
The web Interface password of your receiver (optional)
|
The web interface password of your receiver (optional)
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="checkboxContainer checkboxContainer-withDescription">
|
||||||
|
<label>
|
||||||
|
<input is="emby-checkbox" type="checkbox" id="chkUseLoginForStreams" />
|
||||||
|
<span>Use login for streaming</span>
|
||||||
|
</label>
|
||||||
|
<div class="fieldDescription checkboxFieldDescription">
|
||||||
|
Use web interface login for streaming
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -54,6 +64,16 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="checkboxContainer checkboxContainer-withDescription">
|
||||||
|
<label>
|
||||||
|
<input is="emby-checkbox" type="checkbox" id="chkUseSecureHTTPSForStreams" />
|
||||||
|
<span>Use secure HTTP (HTTPS) for streams</span>
|
||||||
|
</label>
|
||||||
|
<div class="fieldDescription checkboxFieldDescription">
|
||||||
|
Use HTTPS to connect to streaming port
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="checkboxContainer checkboxContainer-withDescription">
|
<div class="checkboxContainer checkboxContainer-withDescription">
|
||||||
<label>
|
<label>
|
||||||
<input is="emby-checkbox" type="checkbox" id="chkOnlyOneBouquet" />
|
<input is="emby-checkbox" type="checkbox" id="chkOnlyOneBouquet" />
|
||||||
@@ -66,7 +86,7 @@
|
|||||||
|
|
||||||
|
|
||||||
<div class="inputContainer">
|
<div class="inputContainer">
|
||||||
<input is="emby-input" id="txtTVBouquet" type="text" label="Vu+ TVBouquet:" />
|
<input is="emby-input" id="txtTVBouquet" type="text" label="Enigma2 TVBouquet:" />
|
||||||
<div class="fieldDescription">
|
<div class="fieldDescription">
|
||||||
The TV Bouquet to load channels for (optional)
|
The TV Bouquet to load channels for (optional)
|
||||||
</div>
|
</div>
|
||||||
@@ -109,7 +129,7 @@
|
|||||||
|
|
||||||
<label class="checkboxContainer">
|
<label class="checkboxContainer">
|
||||||
<input is="emby-checkbox" type="checkbox" id="chkDebugLogging" />
|
<input is="emby-checkbox" type="checkbox" id="chkDebugLogging" />
|
||||||
<span>Enable VuPlus debug logging</span>
|
<span>Enable Enigma2 debug logging</span>
|
||||||
</label>
|
</label>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
@@ -122,19 +142,21 @@
|
|||||||
|
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
var VuPlusConfigurationPage = {
|
var Enigma2ConfigurationPage = {
|
||||||
pluginUniqueId: "9564ac10-af23-39bc-449f-624f23cfa48f",
|
pluginUniqueId: "193f29f9-ea6c-4595-a6f6-55e79d7c590a",
|
||||||
|
|
||||||
loadConfiguration: function () {
|
loadConfiguration: function () {
|
||||||
Dashboard.showLoadingMsg();
|
Dashboard.showLoadingMsg();
|
||||||
|
|
||||||
ApiClient.getPluginConfiguration(VuPlusConfigurationPage.pluginUniqueId).then(function (config) {
|
ApiClient.getPluginConfiguration(Enigma2ConfigurationPage.pluginUniqueId).then(function (config) {
|
||||||
document.getElementById('txtHostName').value = config.HostName || "";
|
document.getElementById('txtHostName').value = config.HostName || "";
|
||||||
document.getElementById('txtStreamingPort').value = config.StreamingPort || "";
|
document.getElementById('txtStreamingPort').value = config.StreamingPort || "";
|
||||||
document.getElementById('txtWebInterfacePort').value = config.WebInterfacePort || "";
|
document.getElementById('txtWebInterfacePort').value = config.WebInterfacePort || "";
|
||||||
document.getElementById('txtWebInterfaceUsername').value = config.WebInterfaceUsername || "";
|
document.getElementById('txtWebInterfaceUsername').value = config.WebInterfaceUsername || "";
|
||||||
document.getElementById('txtWebInterfacePassword').value = config.WebInterfacePassword || "";
|
document.getElementById('txtWebInterfacePassword').value = config.WebInterfacePassword || "";
|
||||||
|
document.getElementById('chkUseLoginForStreams').checked = config.UseLoginForStreams || false;
|
||||||
document.getElementById('chkUseSecureHTTPS').checked = config.UseSecureHTTPS || false;
|
document.getElementById('chkUseSecureHTTPS').checked = config.UseSecureHTTPS || false;
|
||||||
|
document.getElementById('chkUseSecureHTTPSForStreams').checked = config.UseSecureHTTPSForStreams || false;
|
||||||
document.getElementById('chkOnlyOneBouquet').checked = config.OnlyOneBouquet || false;
|
document.getElementById('chkOnlyOneBouquet').checked = config.OnlyOneBouquet || false;
|
||||||
document.getElementById('txtTVBouquet').value = config.TVBouquet || "";
|
document.getElementById('txtTVBouquet').value = config.TVBouquet || "";
|
||||||
document.getElementById('chkZapToChannel').checked = config.ZapToChannel || false;
|
document.getElementById('chkZapToChannel').checked = config.ZapToChannel || false;
|
||||||
@@ -150,13 +172,15 @@
|
|||||||
saveConfiguration: function () {
|
saveConfiguration: function () {
|
||||||
Dashboard.showLoadingMsg();
|
Dashboard.showLoadingMsg();
|
||||||
|
|
||||||
ApiClient.getPluginConfiguration(VuPlusConfigurationPage.pluginUniqueId).then(function (config) {
|
ApiClient.getPluginConfiguration(Enigma2ConfigurationPage.pluginUniqueId).then(function (config) {
|
||||||
config.HostName = document.getElementById('txtHostName').value;
|
config.HostName = document.getElementById('txtHostName').value;
|
||||||
config.StreamingPort = document.getElementById('txtStreamingPort').value;
|
config.StreamingPort = document.getElementById('txtStreamingPort').value;
|
||||||
config.WebInterfacePort = document.getElementById('txtWebInterfacePort').value;
|
config.WebInterfacePort = document.getElementById('txtWebInterfacePort').value;
|
||||||
config.WebInterfaceUsername = document.getElementById('txtWebInterfaceUsername').value;
|
config.WebInterfaceUsername = document.getElementById('txtWebInterfaceUsername').value;
|
||||||
config.WebInterfacePassword = document.getElementById('txtWebInterfacePassword').value;
|
config.WebInterfacePassword = document.getElementById('txtWebInterfacePassword').value;
|
||||||
|
config.UseLoginForStreams = document.getElementById('chkUseLoginForStreams').checked;
|
||||||
config.UseSecureHTTPS = document.getElementById('chkUseSecureHTTPS').checked;
|
config.UseSecureHTTPS = document.getElementById('chkUseSecureHTTPS').checked;
|
||||||
|
config.UseSecureHTTPSForStreams = document.getElementById('chkUseSecureHTTPSForStreams').checked;
|
||||||
config.OnlyOneBouquet = document.getElementById('chkOnlyOneBouquet').checked;
|
config.OnlyOneBouquet = document.getElementById('chkOnlyOneBouquet').checked;
|
||||||
config.TVBouquet = document.getElementById('txtTVBouquet').value;
|
config.TVBouquet = document.getElementById('txtTVBouquet').value;
|
||||||
config.ZapToChannel = document.getElementById('chkZapToChannel').checked;
|
config.ZapToChannel = document.getElementById('chkZapToChannel').checked;
|
||||||
@@ -165,18 +189,18 @@
|
|||||||
config.RecordingPath = document.getElementById('txtRecordingPath').value;
|
config.RecordingPath = document.getElementById('txtRecordingPath').value;
|
||||||
config.EnableDebugLogging = document.getElementById('chkDebugLogging').checked;
|
config.EnableDebugLogging = document.getElementById('chkDebugLogging').checked;
|
||||||
|
|
||||||
ApiClient.updatePluginConfiguration(VuPlusConfigurationPage.pluginUniqueId, config).then(Dashboard.processPluginConfigurationUpdateResult);
|
ApiClient.updatePluginConfiguration(Enigma2ConfigurationPage.pluginUniqueId, config).then(Dashboard.processPluginConfigurationUpdateResult);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
document.getElementById('VuPlusConfigurationPage').addEventListener('pageshow', function () {
|
document.getElementById('Enigma2ConfigurationPage').addEventListener('pageshow', function () {
|
||||||
VuPlusConfigurationPage.loadConfiguration();
|
Enigma2ConfigurationPage.loadConfiguration();
|
||||||
});
|
});
|
||||||
|
|
||||||
document.getElementById('VuPlusConfigurationForm').addEventListener('submit', function (e) {
|
document.getElementById('Enigma2ConfigurationForm').addEventListener('submit', function (e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
VuPlusConfigurationPage.saveConfiguration();
|
Enigma2ConfigurationPage.saveConfiguration();
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
</div>
|
</div>
|
||||||
+1
-1
@@ -2,7 +2,7 @@ using System;
|
|||||||
using MediaBrowser.Model.LiveTv;
|
using MediaBrowser.Model.LiveTv;
|
||||||
using Microsoft.Extensions.Logging;
|
using Microsoft.Extensions.Logging;
|
||||||
|
|
||||||
namespace MediaBrowser.Plugins.VuPlus.Helpers
|
namespace Jellyfin.Plugin.Enigma2.Helpers
|
||||||
{
|
{
|
||||||
public static class ChannelHelper
|
public static class ChannelHelper
|
||||||
{
|
{
|
||||||
|
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 20 KiB |
+10
-10
@@ -1,12 +1,12 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFrameworks>net5.0</TargetFrameworks>
|
<TargetFrameworks>net6.0</TargetFrameworks>
|
||||||
<AssemblyVersion>4.0.0.0</AssemblyVersion>
|
<AssemblyVersion>5.0.0.0</AssemblyVersion>
|
||||||
<FileVersion>4.0.0.0</FileVersion>
|
<FileVersion>5.0.0.0</FileVersion>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Release|net5.0|AnyCPU'">
|
<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Release|net6.0|AnyCPU'">
|
||||||
<DebugType>none</DebugType>
|
<DebugType>none</DebugType>
|
||||||
<DebugSymbols>false</DebugSymbols>
|
<DebugSymbols>false</DebugSymbols>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
@@ -20,12 +20,12 @@
|
|||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Jellyfin.Common" Version="10.7.0" />
|
<PackageReference Include="Jellyfin.Common" Version="10.8.0" />
|
||||||
<PackageReference Include="Jellyfin.Naming" Version="10.7.0" />
|
<PackageReference Include="Jellyfin.Naming" Version="10.8.0" />
|
||||||
<PackageReference Include="Jellyfin.Controller" Version="10.7.0" />
|
<PackageReference Include="Jellyfin.Controller" Version="10.8.0" />
|
||||||
<PackageReference Include="Jellyfin.Model" Version="10.7.0" />
|
<PackageReference Include="Jellyfin.Model" Version="10.8.0" />
|
||||||
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="5.0.1" />
|
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="6.0.0" />
|
||||||
<PackageReference Include="Microsoft.Extensions.Http" Version="5.0.0" />
|
<PackageReference Include="Microsoft.Extensions.Http" Version="6.0.0" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
+125
-120
@@ -17,20 +17,18 @@ using MediaBrowser.Model.Dto;
|
|||||||
using MediaBrowser.Model.Entities;
|
using MediaBrowser.Model.Entities;
|
||||||
using MediaBrowser.Model.LiveTv;
|
using MediaBrowser.Model.LiveTv;
|
||||||
using MediaBrowser.Model.MediaInfo;
|
using MediaBrowser.Model.MediaInfo;
|
||||||
using MediaBrowser.Plugins.VuPlus.Helpers;
|
using Jellyfin.Plugin.Enigma2.Helpers;
|
||||||
using Microsoft.Extensions.Logging;
|
using Microsoft.Extensions.Logging;
|
||||||
|
|
||||||
namespace MediaBrowser.Plugins.VuPlus
|
namespace Jellyfin.Plugin.Enigma2
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Class LiveTvService
|
/// Class LiveTvService
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class LiveTvService : ILiveTvService
|
public class LiveTvService : ILiveTvService
|
||||||
{
|
{
|
||||||
private readonly CultureInfo _usCulture = new CultureInfo("en-US");
|
|
||||||
private readonly ILogger<LiveTvService> _logger;
|
private readonly ILogger<LiveTvService> _logger;
|
||||||
private int _liveStreams;
|
private int _liveStreams;
|
||||||
private readonly Dictionary<int, int> _heartBeat = new Dictionary<int, int>();
|
|
||||||
|
|
||||||
private string tvBouquetSRef;
|
private string tvBouquetSRef;
|
||||||
private List<ChannelInfo> tvChannelInfos = new List<ChannelInfo>();
|
private List<ChannelInfo> tvChannelInfos = new List<ChannelInfo>();
|
||||||
@@ -47,72 +45,74 @@ namespace MediaBrowser.Plugins.VuPlus
|
|||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Ensure that we are connected to the VuPlus server
|
/// Ensure that we are connected to the Enigma2 server
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="cancellationToken"></param>
|
/// <param name="cancellationToken"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
private async Task EnsureConnectionAsync(CancellationToken cancellationToken)
|
private async Task EnsureConnectionAsync(CancellationToken cancellationToken)
|
||||||
{
|
{
|
||||||
_logger.LogInformation("[VuPlus] Start EnsureConnectionAsync");
|
_logger.LogInformation("[Enigma2] Start EnsureConnectionAsync");
|
||||||
|
|
||||||
var config = Plugin.Instance.Configuration;
|
var config = Plugin.Instance.Configuration;
|
||||||
|
|
||||||
// log settings
|
// log settings
|
||||||
_logger.LogInformation(string.Format("[VuPlus] EnsureConnectionAsync HostName: {0}", config.HostName));
|
_logger.LogInformation(string.Format("[Enigma2] EnsureConnectionAsync HostName: {0}", config.HostName));
|
||||||
_logger.LogInformation(string.Format("[VuPlus] EnsureConnectionAsync StreamingPort: {0}", config.StreamingPort));
|
_logger.LogInformation(string.Format("[Enigma2] EnsureConnectionAsync StreamingPort: {0}", config.StreamingPort));
|
||||||
_logger.LogInformation(string.Format("[VuPlus] EnsureConnectionAsync WebInterfacePort: {0}", config.WebInterfacePort));
|
_logger.LogInformation(string.Format("[Enigma2] EnsureConnectionAsync WebInterfacePort: {0}", config.WebInterfacePort));
|
||||||
if (string.IsNullOrEmpty(config.WebInterfaceUsername))
|
if (string.IsNullOrEmpty(config.WebInterfaceUsername))
|
||||||
{
|
{
|
||||||
_logger.LogInformation("[VuPlus] EnsureConnectionAsync WebInterfaceUsername: ");
|
_logger.LogInformation("[Enigma2] EnsureConnectionAsync WebInterfaceUsername: ");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
_logger.LogInformation(string.Format("[VuPlus] EnsureConnectionAsync WebInterfaceUsername: {0}", "********"));
|
_logger.LogInformation(string.Format("[Enigma2] EnsureConnectionAsync WebInterfaceUsername: {0}", "********"));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (string.IsNullOrEmpty(config.WebInterfacePassword))
|
if (string.IsNullOrEmpty(config.WebInterfacePassword))
|
||||||
{
|
{
|
||||||
_logger.LogInformation("[VuPlus] EnsureConnectionAsync WebInterfacePassword: ");
|
_logger.LogInformation("[Enigma2] EnsureConnectionAsync WebInterfacePassword: ");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
_logger.LogInformation(string.Format("[VuPlus] EnsureConnectionAsync WebInterfaceUsername: {0}", "********"));
|
_logger.LogInformation(string.Format("[Enigma2] EnsureConnectionAsync WebInterfaceUsername: {0}", "********"));
|
||||||
}
|
}
|
||||||
|
|
||||||
_logger.LogInformation(string.Format("[VuPlus] EnsureConnectionAsync UseSecureHTTPS: {0}", config.UseSecureHTTPS));
|
_logger.LogInformation(string.Format("[Enigma2] EnsureConnectionAsync UseLoginForStreams: {0}", config.UseLoginForStreams));
|
||||||
_logger.LogInformation(string.Format("[VuPlus] EnsureConnectionAsync OnlyOneBouquet: {0}", config.OnlyOneBouquet));
|
_logger.LogInformation(string.Format("[Enigma2] EnsureConnectionAsync UseSecureHTTPS: {0}", config.UseSecureHTTPS));
|
||||||
_logger.LogInformation(string.Format("[VuPlus] EnsureConnectionAsync TVBouquet: {0}", config.TVBouquet));
|
_logger.LogInformation(string.Format("[Enigma2] EnsureConnectionAsync UseSecureHTTPSForStreams: {0}", config.UseSecureHTTPSForStreams));
|
||||||
_logger.LogInformation(string.Format("[VuPlus] EnsureConnectionAsync ZapToChannel: {0}", config.ZapToChannel));
|
_logger.LogInformation(string.Format("[Enigma2] EnsureConnectionAsync OnlyOneBouquet: {0}", config.OnlyOneBouquet));
|
||||||
_logger.LogInformation(string.Format("[VuPlus] EnsureConnectionAsync FetchPiconsFromWebInterface: {0}", config.FetchPiconsFromWebInterface));
|
_logger.LogInformation(string.Format("[Enigma2] EnsureConnectionAsync TVBouquet: {0}", config.TVBouquet));
|
||||||
_logger.LogInformation(string.Format("[VuPlus] EnsureConnectionAsync PiconsPath: {0}", config.PiconsPath));
|
_logger.LogInformation(string.Format("[Enigma2] EnsureConnectionAsync ZapToChannel: {0}", config.ZapToChannel));
|
||||||
_logger.LogInformation(string.Format("[VuPlus] EnsureConnectionAsync RecordingPath: {0}", config.RecordingPath));
|
_logger.LogInformation(string.Format("[Enigma2] EnsureConnectionAsync FetchPiconsFromWebInterface: {0}", config.FetchPiconsFromWebInterface));
|
||||||
_logger.LogInformation(string.Format("[VuPlus] EnsureConnectionAsync EnableDebugLogging: {0}", config.EnableDebugLogging));
|
_logger.LogInformation(string.Format("[Enigma2] EnsureConnectionAsync PiconsPath: {0}", config.PiconsPath));
|
||||||
|
_logger.LogInformation(string.Format("[Enigma2] EnsureConnectionAsync RecordingPath: {0}", config.RecordingPath));
|
||||||
|
_logger.LogInformation(string.Format("[Enigma2] EnsureConnectionAsync EnableDebugLogging: {0}", config.EnableDebugLogging));
|
||||||
|
|
||||||
// validate settings
|
// validate settings
|
||||||
if (string.IsNullOrEmpty(config.HostName))
|
if (string.IsNullOrEmpty(config.HostName))
|
||||||
{
|
{
|
||||||
_logger.LogError("[VuPlus] HostName must be configured.");
|
_logger.LogError("[Enigma2] HostName must be configured.");
|
||||||
throw new InvalidOperationException("VuPlus HostName must be configured.");
|
throw new InvalidOperationException("Enigma2 HostName must be configured.");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (string.IsNullOrEmpty(config.StreamingPort))
|
if (string.IsNullOrEmpty(config.StreamingPort))
|
||||||
{
|
{
|
||||||
_logger.LogError("[VuPlus] Streaming Port must be configured.");
|
_logger.LogError("[Enigma2] Streaming Port must be configured.");
|
||||||
throw new InvalidOperationException("VuPlus Streaming Port must be configured.");
|
throw new InvalidOperationException("Enigma2 Streaming Port must be configured.");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (string.IsNullOrEmpty(config.WebInterfacePort))
|
if (string.IsNullOrEmpty(config.WebInterfacePort))
|
||||||
{
|
{
|
||||||
_logger.LogError("[VuPlus] Web Interface Port must be configured.");
|
_logger.LogError("[Enigma2] Web Interface Port must be configured.");
|
||||||
throw new InvalidOperationException("VuPlus Web Interface Port must be configured.");
|
throw new InvalidOperationException("Enigma2 Web Interface Port must be configured.");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (config.OnlyOneBouquet)
|
if (config.OnlyOneBouquet)
|
||||||
{
|
{
|
||||||
if (string.IsNullOrEmpty(config.TVBouquet))
|
if (string.IsNullOrEmpty(config.TVBouquet))
|
||||||
{
|
{
|
||||||
_logger.LogError("[VuPlus] TV Bouquet must be configured if Fetch only one TV bouquet selected.");
|
_logger.LogError("[Enigma2] TV Bouquet must be configured if Fetch only one TV bouquet selected.");
|
||||||
throw new InvalidOperationException("VuPlus TVBouquet must be configured if Fetch only one TV bouquet selected.");
|
throw new InvalidOperationException("Enigma2 TVBouquet must be configured if Fetch only one TV bouquet selected.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -120,21 +120,21 @@ namespace MediaBrowser.Plugins.VuPlus
|
|||||||
{
|
{
|
||||||
if (string.IsNullOrEmpty(config.PiconsPath))
|
if (string.IsNullOrEmpty(config.PiconsPath))
|
||||||
{
|
{
|
||||||
_logger.LogError("[VuPlus] Picons location must be configured if Fetch Picons from Web Service is disabled.");
|
_logger.LogError("[Enigma2] Picons location must be configured if Fetch Picons from Web Service is disabled.");
|
||||||
throw new InvalidOperationException("VuPlus Picons location must be configured if Fetch Picons from Web Service is disabled.");
|
throw new InvalidOperationException("Enigma2 Picons location must be configured if Fetch Picons from Web Service is disabled.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
_logger.LogInformation("[VuPlus] EnsureConnectionAsync Validation of config parameters completed");
|
_logger.LogInformation("[Enigma2] EnsureConnectionAsync Validation of config parameters completed");
|
||||||
|
|
||||||
if (config.OnlyOneBouquet)
|
if (config.OnlyOneBouquet)
|
||||||
{
|
{
|
||||||
// connect to VuPlus box to test connectivity and at same time get sRef for TV Bouquet.
|
// connect to Enigma2 box to test connectivity and at same time get sRef for TV Bouquet.
|
||||||
tvBouquetSRef = await InitiateSession(cancellationToken, config.TVBouquet).ConfigureAwait(false);
|
tvBouquetSRef = await InitiateSession(cancellationToken, config.TVBouquet).ConfigureAwait(false);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// connect to VuPlus box to test connectivity.
|
// connect to Enigma2 box to test connectivity.
|
||||||
var resultNotRequired = await InitiateSession(cancellationToken, null).ConfigureAwait(false);
|
var resultNotRequired = await InitiateSession(cancellationToken, null).ConfigureAwait(false);
|
||||||
tvBouquetSRef = null;
|
tvBouquetSRef = null;
|
||||||
}
|
}
|
||||||
@@ -162,14 +162,14 @@ namespace MediaBrowser.Plugins.VuPlus
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Checks connection to VuPlus and retrieves service reference for channel if only one bouquet.
|
/// Checks connection to Enigma2 and retrieves service reference for channel if only one bouquet.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="cancellationToken">The cancellation token.</param>
|
/// <param name="cancellationToken">The cancellation token.</param>
|
||||||
/// <param name="tvBouquet">The TV Bouquet.</param>
|
/// <param name="tvBouquet">The TV Bouquet.</param>
|
||||||
/// <returns>Task{String>}.</returns>
|
/// <returns>Task{String>}.</returns>
|
||||||
public async Task<string> InitiateSession(CancellationToken cancellationToken, string tvBouquet)
|
public async Task<string> InitiateSession(CancellationToken cancellationToken, string tvBouquet)
|
||||||
{
|
{
|
||||||
_logger.LogInformation("[VuPlus] Start InitiateSession, validates connection and returns Bouquet reference if required");
|
_logger.LogInformation("[Enigma2] Start InitiateSession, validates connection and returns Bouquet reference if required");
|
||||||
//await EnsureConnectionAsync(cancellationToken).ConfigureAwait(false);
|
//await EnsureConnectionAsync(cancellationToken).ConfigureAwait(false);
|
||||||
|
|
||||||
var protocol = "http";
|
var protocol = "http";
|
||||||
@@ -181,14 +181,14 @@ namespace MediaBrowser.Plugins.VuPlus
|
|||||||
var baseUrl = protocol + "://" + Plugin.Instance.Configuration.HostName + ":" + Plugin.Instance.Configuration.WebInterfacePort;
|
var baseUrl = protocol + "://" + Plugin.Instance.Configuration.HostName + ":" + Plugin.Instance.Configuration.WebInterfacePort;
|
||||||
|
|
||||||
var url = string.Format("{0}/web/getservices", baseUrl);
|
var url = string.Format("{0}/web/getservices", baseUrl);
|
||||||
UtilsHelper.DebugInformation(_logger, string.Format("[VuPlus] InitiateSession url: {0}", url));
|
UtilsHelper.DebugInformation(_logger, string.Format("[Enigma2] InitiateSession url: {0}", url));
|
||||||
|
|
||||||
using (var stream = await _httpClient.GetStreamAsync(url, cancellationToken).ConfigureAwait(false))
|
using (var stream = await _httpClient.GetStreamAsync(url, cancellationToken).ConfigureAwait(false))
|
||||||
{
|
{
|
||||||
using (var reader = new StreamReader(stream))
|
using (var reader = new StreamReader(stream))
|
||||||
{
|
{
|
||||||
var xmlResponse = reader.ReadToEnd();
|
var xmlResponse = reader.ReadToEnd();
|
||||||
UtilsHelper.DebugInformation(_logger, string.Format("[VuPlus] InitiateSession response: {0}", xmlResponse));
|
UtilsHelper.DebugInformation(_logger, string.Format("[Enigma2] InitiateSession response: {0}", xmlResponse));
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
@@ -229,17 +229,17 @@ namespace MediaBrowser.Plugins.VuPlus
|
|||||||
// make sure we have found the TV Bouquet
|
// make sure we have found the TV Bouquet
|
||||||
if (!string.IsNullOrEmpty(tvBouquet))
|
if (!string.IsNullOrEmpty(tvBouquet))
|
||||||
{
|
{
|
||||||
_logger.LogError("[VuPlus] Failed to find TV Bouquet specified in VuPlus configuration.");
|
_logger.LogError("[Enigma2] Failed to find TV Bouquet specified in Enigma2 configuration.");
|
||||||
throw new ApplicationException("Failed to find TV Bouquet specified in VuPlus configuration.");
|
throw new ApplicationException("Failed to find TV Bouquet specified in Enigma2 configuration.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return tvBouquetReference;
|
return tvBouquetReference;
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
_logger.LogError("[VuPlus] Failed to parse services information.");
|
_logger.LogError("[Enigma2] Failed to parse services information.");
|
||||||
_logger.LogError(string.Format("[VuPlus] InitiateSession error: {0}", e.Message));
|
_logger.LogError(string.Format("[Enigma2] InitiateSession error: {0}", e.Message));
|
||||||
throw new ApplicationException("Failed to connect to VuPlus.");
|
throw new ApplicationException("Failed to connect to Enigma2.");
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -254,7 +254,7 @@ namespace MediaBrowser.Plugins.VuPlus
|
|||||||
/// <returns>Task{IEnumerable{ChannelInfo}}.</returns>
|
/// <returns>Task{IEnumerable{ChannelInfo}}.</returns>
|
||||||
public async Task<IEnumerable<ChannelInfo>> GetChannelsAsync(CancellationToken cancellationToken)
|
public async Task<IEnumerable<ChannelInfo>> GetChannelsAsync(CancellationToken cancellationToken)
|
||||||
{
|
{
|
||||||
_logger.LogInformation("[VuPlus] Start GetChannelsAsync, retrieve all channels");
|
_logger.LogInformation("[Enigma2] Start GetChannelsAsync, retrieve all channels");
|
||||||
await EnsureConnectionAsync(cancellationToken).ConfigureAwait(false);
|
await EnsureConnectionAsync(cancellationToken).ConfigureAwait(false);
|
||||||
|
|
||||||
var protocol = "http";
|
var protocol = "http";
|
||||||
@@ -267,7 +267,7 @@ namespace MediaBrowser.Plugins.VuPlus
|
|||||||
|
|
||||||
var baseUrlPicon = protocol + "://" + Plugin.Instance.Configuration.HostName + ":" + Plugin.Instance.Configuration.WebInterfacePort;
|
var baseUrlPicon = protocol + "://" + Plugin.Instance.Configuration.HostName + ":" + Plugin.Instance.Configuration.WebInterfacePort;
|
||||||
|
|
||||||
var url = "";
|
string url;
|
||||||
if (string.IsNullOrEmpty(tvBouquetSRef))
|
if (string.IsNullOrEmpty(tvBouquetSRef))
|
||||||
{
|
{
|
||||||
url = string.Format("{0}/web/getservices", baseUrl);
|
url = string.Format("{0}/web/getservices", baseUrl);
|
||||||
@@ -277,7 +277,7 @@ namespace MediaBrowser.Plugins.VuPlus
|
|||||||
url = string.Format("{0}/web/getservices?sRef={1}", baseUrl, tvBouquetSRef);
|
url = string.Format("{0}/web/getservices?sRef={1}", baseUrl, tvBouquetSRef);
|
||||||
}
|
}
|
||||||
|
|
||||||
UtilsHelper.DebugInformation(_logger, string.Format("[VuPlus] GetChannelsAsync url: {0}", url));
|
UtilsHelper.DebugInformation(_logger, string.Format("[Enigma2] GetChannelsAsync url: {0}", url));
|
||||||
|
|
||||||
if (!string.IsNullOrEmpty(Plugin.Instance.Configuration.WebInterfaceUsername))
|
if (!string.IsNullOrEmpty(Plugin.Instance.Configuration.WebInterfaceUsername))
|
||||||
{
|
{
|
||||||
@@ -290,7 +290,7 @@ namespace MediaBrowser.Plugins.VuPlus
|
|||||||
{
|
{
|
||||||
|
|
||||||
var xmlResponse = reader.ReadToEnd();
|
var xmlResponse = reader.ReadToEnd();
|
||||||
UtilsHelper.DebugInformation(_logger, string.Format("[VuPlus] GetChannelsAsync response: {0}", xmlResponse));
|
UtilsHelper.DebugInformation(_logger, string.Format("[Enigma2] GetChannelsAsync response: {0}", xmlResponse));
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
@@ -302,7 +302,7 @@ namespace MediaBrowser.Plugins.VuPlus
|
|||||||
if (string.IsNullOrEmpty(tvBouquetSRef))
|
if (string.IsNullOrEmpty(tvBouquetSRef))
|
||||||
{
|
{
|
||||||
// Load channels from all TV Bouquets
|
// Load channels from all TV Bouquets
|
||||||
_logger.LogInformation("[VuPlus] GetChannelsAsync for all TV Bouquets");
|
_logger.LogInformation("[Enigma2] GetChannelsAsync for all TV Bouquets");
|
||||||
|
|
||||||
var e2services = xml.GetElementsByTagName("e2service");
|
var e2services = xml.GetElementsByTagName("e2service");
|
||||||
foreach (XmlNode xmlNode in e2services)
|
foreach (XmlNode xmlNode in e2services)
|
||||||
@@ -400,7 +400,7 @@ namespace MediaBrowser.Plugins.VuPlus
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
_logger.LogInformation("[VuPlus] ignoring channel label " + e2servicereference);
|
_logger.LogInformation("[Enigma2] ignoring channel label " + e2servicereference);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -409,8 +409,8 @@ namespace MediaBrowser.Plugins.VuPlus
|
|||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
_logger.LogError("[VuPlus] Failed to parse channel information.");
|
_logger.LogError("[Enigma2] Failed to parse channel information.");
|
||||||
_logger.LogError(string.Format("[VuPlus] GetChannelsAsync error: {0}", e.Message));
|
_logger.LogError(string.Format("[Enigma2] GetChannelsAsync error: {0}", e.Message));
|
||||||
throw new ApplicationException("Failed to parse channel information.");
|
throw new ApplicationException("Failed to parse channel information.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -426,7 +426,7 @@ namespace MediaBrowser.Plugins.VuPlus
|
|||||||
/// <returns>Task{List<ChannelInfo>}.</returns>
|
/// <returns>Task{List<ChannelInfo>}.</returns>
|
||||||
public async Task<List<ChannelInfo>> GetChannelsForTVBouquetAsync(CancellationToken cancellationToken, string sRef)
|
public async Task<List<ChannelInfo>> GetChannelsForTVBouquetAsync(CancellationToken cancellationToken, string sRef)
|
||||||
{
|
{
|
||||||
_logger.LogInformation("[VuPlus] Start GetChannelsForTVBouquetAsync, retrieve all channels for TV Bouquet " + sRef);
|
_logger.LogInformation("[Enigma2] Start GetChannelsForTVBouquetAsync, retrieve all channels for TV Bouquet " + sRef);
|
||||||
await EnsureConnectionAsync(cancellationToken).ConfigureAwait(false);
|
await EnsureConnectionAsync(cancellationToken).ConfigureAwait(false);
|
||||||
|
|
||||||
var protocol = "http";
|
var protocol = "http";
|
||||||
@@ -437,11 +437,11 @@ namespace MediaBrowser.Plugins.VuPlus
|
|||||||
|
|
||||||
var baseUrl = protocol + "://" + Plugin.Instance.Configuration.HostName + ":" + Plugin.Instance.Configuration.WebInterfacePort;
|
var baseUrl = protocol + "://" + Plugin.Instance.Configuration.HostName + ":" + Plugin.Instance.Configuration.WebInterfacePort;
|
||||||
|
|
||||||
var baseUrlPicon = protocol + "://" + Plugin.Instance.Configuration.WebInterfaceUsername + ":" + Plugin.Instance.Configuration.WebInterfacePassword + "@" + Plugin.Instance.Configuration.HostName + ":" + Plugin.Instance.Configuration.WebInterfacePort;
|
var baseUrlPicon = baseUrl;
|
||||||
|
|
||||||
var url = string.Format("{0}/web/getservices?sRef={1}", baseUrl, sRef);
|
var url = string.Format("{0}/web/getservices?sRef={1}", baseUrl, sRef);
|
||||||
|
|
||||||
UtilsHelper.DebugInformation(_logger, string.Format("[VuPlus] GetChannelsForTVBouquetAsync url: {0}", url));
|
UtilsHelper.DebugInformation(_logger, string.Format("[Enigma2] GetChannelsForTVBouquetAsync url: {0}", url));
|
||||||
|
|
||||||
if (!string.IsNullOrEmpty(Plugin.Instance.Configuration.WebInterfaceUsername))
|
if (!string.IsNullOrEmpty(Plugin.Instance.Configuration.WebInterfaceUsername))
|
||||||
{
|
{
|
||||||
@@ -453,7 +453,7 @@ namespace MediaBrowser.Plugins.VuPlus
|
|||||||
using (var reader = new StreamReader(stream))
|
using (var reader = new StreamReader(stream))
|
||||||
{
|
{
|
||||||
var xmlResponse = reader.ReadToEnd();
|
var xmlResponse = reader.ReadToEnd();
|
||||||
UtilsHelper.DebugInformation(_logger, string.Format("[VuPlus] GetChannelsForTVBouquetAsync response: {0}", xmlResponse));
|
UtilsHelper.DebugInformation(_logger, string.Format("[Enigma2] GetChannelsForTVBouquetAsync response: {0}", xmlResponse));
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
@@ -529,15 +529,15 @@ namespace MediaBrowser.Plugins.VuPlus
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
UtilsHelper.DebugInformation(_logger, string.Format("[VuPlus] ignoring channel {0}", e2servicereference));
|
UtilsHelper.DebugInformation(_logger, string.Format("[Enigma2] ignoring channel {0}", e2servicereference));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return channelInfos;
|
return channelInfos;
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
_logger.LogError("[VuPlus] Failed to parse channel information.");
|
_logger.LogError("[Enigma2] Failed to parse channel information.");
|
||||||
_logger.LogError(string.Format("[VuPlus] GetChannelsForTVBouquetAsync error: {0}", e.Message));
|
_logger.LogError(string.Format("[Enigma2] GetChannelsForTVBouquetAsync error: {0}", e.Message));
|
||||||
throw new ApplicationException("Failed to parse channel information.");
|
throw new ApplicationException("Failed to parse channel information.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -557,7 +557,7 @@ namespace MediaBrowser.Plugins.VuPlus
|
|||||||
|
|
||||||
public async Task<IEnumerable<MyRecordingInfo>> GetAllRecordingsAsync(CancellationToken cancellationToken)
|
public async Task<IEnumerable<MyRecordingInfo>> GetAllRecordingsAsync(CancellationToken cancellationToken)
|
||||||
{
|
{
|
||||||
_logger.LogInformation("[VuPlus] Start GetRecordingsAsync, retrieve all 'Inprogress' and 'Completed' recordings ");
|
_logger.LogInformation("[Enigma2] Start GetRecordingsAsync, retrieve all 'Inprogress' and 'Completed' recordings ");
|
||||||
await EnsureConnectionAsync(cancellationToken).ConfigureAwait(false);
|
await EnsureConnectionAsync(cancellationToken).ConfigureAwait(false);
|
||||||
|
|
||||||
var protocol = "http";
|
var protocol = "http";
|
||||||
@@ -569,14 +569,14 @@ namespace MediaBrowser.Plugins.VuPlus
|
|||||||
var baseUrl = protocol + "://" + Plugin.Instance.Configuration.HostName + ":" + Plugin.Instance.Configuration.WebInterfacePort;
|
var baseUrl = protocol + "://" + Plugin.Instance.Configuration.HostName + ":" + Plugin.Instance.Configuration.WebInterfacePort;
|
||||||
|
|
||||||
var url = string.Format("{0}/web/movielist", baseUrl);
|
var url = string.Format("{0}/web/movielist", baseUrl);
|
||||||
UtilsHelper.DebugInformation(_logger, string.Format("[VuPlus] GetRecordingsAsync url: {0}", url));
|
UtilsHelper.DebugInformation(_logger, string.Format("[Enigma2] GetRecordingsAsync url: {0}", url));
|
||||||
|
|
||||||
using (var stream = await _httpClient.GetStreamAsync(url, cancellationToken).ConfigureAwait(false))
|
using (var stream = await _httpClient.GetStreamAsync(url, cancellationToken).ConfigureAwait(false))
|
||||||
{
|
{
|
||||||
using (var reader = new StreamReader(stream))
|
using (var reader = new StreamReader(stream))
|
||||||
{
|
{
|
||||||
var xmlResponse = reader.ReadToEnd();
|
var xmlResponse = reader.ReadToEnd();
|
||||||
UtilsHelper.DebugInformation(_logger, string.Format("[VuPlus] GetRecordingsAsync response: {0}", xmlResponse));
|
UtilsHelper.DebugInformation(_logger, string.Format("[Enigma2] GetRecordingsAsync response: {0}", xmlResponse));
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
@@ -654,7 +654,7 @@ namespace MediaBrowser.Plugins.VuPlus
|
|||||||
{
|
{
|
||||||
if (channelInfo.Name == e2servicename)
|
if (channelInfo.Name == e2servicename)
|
||||||
{
|
{
|
||||||
UtilsHelper.DebugInformation(_logger, string.Format("[VuPlus] GetRecordingsAsync match on channel name : {0} for recording {1}", e2servicename, e2title));
|
UtilsHelper.DebugInformation(_logger, string.Format("[Enigma2] GetRecordingsAsync match on channel name : {0} for recording {1}", e2servicename, e2title));
|
||||||
recordingInfo.ChannelId = channelInfo.Id;
|
recordingInfo.ChannelId = channelInfo.Id;
|
||||||
recordingInfo.ChannelType = channelInfo.ChannelType;
|
recordingInfo.ChannelType = channelInfo.ChannelType;
|
||||||
recordingInfo.HasImage = true;
|
recordingInfo.HasImage = true;
|
||||||
@@ -666,7 +666,7 @@ namespace MediaBrowser.Plugins.VuPlus
|
|||||||
|
|
||||||
if (recordingInfo.ChannelId == null)
|
if (recordingInfo.ChannelId == null)
|
||||||
{
|
{
|
||||||
UtilsHelper.DebugInformation(_logger, string.Format("[VuPlus] GetRecordingsAsync no match on channel name : {0} for recording {1}", e2servicename, e2title));
|
UtilsHelper.DebugInformation(_logger, string.Format("[Enigma2] GetRecordingsAsync no match on channel name : {0} for recording {1}", e2servicename, e2title));
|
||||||
}
|
}
|
||||||
|
|
||||||
recordingInfo.CommunityRating = 0;
|
recordingInfo.CommunityRating = 0;
|
||||||
@@ -720,8 +720,8 @@ namespace MediaBrowser.Plugins.VuPlus
|
|||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
_logger.LogError("[VuPlus] Failed to parse timer information.");
|
_logger.LogError("[Enigma2] Failed to parse timer information.");
|
||||||
_logger.LogError(string.Format("[VuPlus] GetRecordingsAsync error: {0}", e.Message));
|
_logger.LogError(string.Format("[Enigma2] GetRecordingsAsync error: {0}", e.Message));
|
||||||
throw new ApplicationException("Failed to parse timer information.");
|
throw new ApplicationException("Failed to parse timer information.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -736,7 +736,7 @@ namespace MediaBrowser.Plugins.VuPlus
|
|||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public async Task DeleteRecordingAsync(string recordingId, CancellationToken cancellationToken)
|
public async Task DeleteRecordingAsync(string recordingId, CancellationToken cancellationToken)
|
||||||
{
|
{
|
||||||
_logger.LogInformation(string.Format("[VuPlus] Start Delete Recording Async for recordingId: {0}", recordingId));
|
_logger.LogInformation(string.Format("[Enigma2] Start Delete Recording Async for recordingId: {0}", recordingId));
|
||||||
await EnsureConnectionAsync(cancellationToken).ConfigureAwait(false);
|
await EnsureConnectionAsync(cancellationToken).ConfigureAwait(false);
|
||||||
|
|
||||||
var protocol = "http";
|
var protocol = "http";
|
||||||
@@ -748,14 +748,14 @@ namespace MediaBrowser.Plugins.VuPlus
|
|||||||
var baseUrl = protocol + "://" + Plugin.Instance.Configuration.HostName + ":" + Plugin.Instance.Configuration.WebInterfacePort;
|
var baseUrl = protocol + "://" + Plugin.Instance.Configuration.HostName + ":" + Plugin.Instance.Configuration.WebInterfacePort;
|
||||||
|
|
||||||
var url = string.Format("{0}/web/moviedelete?sRef={1}", baseUrl, recordingId);
|
var url = string.Format("{0}/web/moviedelete?sRef={1}", baseUrl, recordingId);
|
||||||
UtilsHelper.DebugInformation(_logger, string.Format("[VuPlus] DeleteRecordingAsync url: {0}", url));
|
UtilsHelper.DebugInformation(_logger, string.Format("[Enigma2] DeleteRecordingAsync url: {0}", url));
|
||||||
|
|
||||||
using (var stream = await _httpClient.GetStreamAsync(url, cancellationToken).ConfigureAwait(false))
|
using (var stream = await _httpClient.GetStreamAsync(url, cancellationToken).ConfigureAwait(false))
|
||||||
{
|
{
|
||||||
using (var reader = new StreamReader(stream))
|
using (var reader = new StreamReader(stream))
|
||||||
{
|
{
|
||||||
var xmlResponse = reader.ReadToEnd();
|
var xmlResponse = reader.ReadToEnd();
|
||||||
UtilsHelper.DebugInformation(_logger, string.Format("[VuPlus] DeleteRecordingAsync response: {0}", xmlResponse));
|
UtilsHelper.DebugInformation(_logger, string.Format("[Enigma2] DeleteRecordingAsync response: {0}", xmlResponse));
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
@@ -784,16 +784,16 @@ namespace MediaBrowser.Plugins.VuPlus
|
|||||||
|
|
||||||
if (e2state != "True")
|
if (e2state != "True")
|
||||||
{
|
{
|
||||||
_logger.LogError("[VuPlus] Failed to delete recording information.");
|
_logger.LogError("[Enigma2] Failed to delete recording information.");
|
||||||
_logger.LogError(string.Format("[VuPlus] DeleteRecordingAsync e2statetext: {0}", e2statetext));
|
_logger.LogError(string.Format("[Enigma2] DeleteRecordingAsync e2statetext: {0}", e2statetext));
|
||||||
throw new ApplicationException("Failed to delete recording.");
|
throw new ApplicationException("Failed to delete recording.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
_logger.LogError("[VuPlus] Failed to parse delete recording information.");
|
_logger.LogError("[Enigma2] Failed to parse delete recording information.");
|
||||||
_logger.LogError(string.Format("[VuPlus] DeleteRecordingAsync error: {0}", e.Message));
|
_logger.LogError(string.Format("[Enigma2] DeleteRecordingAsync error: {0}", e.Message));
|
||||||
throw new ApplicationException("Failed to parse delete recording information.");
|
throw new ApplicationException("Failed to parse delete recording information.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -809,7 +809,7 @@ namespace MediaBrowser.Plugins.VuPlus
|
|||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public async Task CancelTimerAsync(string timerId, CancellationToken cancellationToken)
|
public async Task CancelTimerAsync(string timerId, CancellationToken cancellationToken)
|
||||||
{
|
{
|
||||||
_logger.LogInformation(string.Format("[VuPlus] Start CancelTimerAsync for recordingId: {0}", timerId));
|
_logger.LogInformation(string.Format("[Enigma2] Start CancelTimerAsync for recordingId: {0}", timerId));
|
||||||
await EnsureConnectionAsync(cancellationToken).ConfigureAwait(false);
|
await EnsureConnectionAsync(cancellationToken).ConfigureAwait(false);
|
||||||
|
|
||||||
// extract sRef, id, begin and end from passed timerId
|
// extract sRef, id, begin and end from passed timerId
|
||||||
@@ -828,14 +828,14 @@ namespace MediaBrowser.Plugins.VuPlus
|
|||||||
var baseUrl = protocol + "://" + Plugin.Instance.Configuration.HostName + ":" + Plugin.Instance.Configuration.WebInterfacePort;
|
var baseUrl = protocol + "://" + Plugin.Instance.Configuration.HostName + ":" + Plugin.Instance.Configuration.WebInterfacePort;
|
||||||
|
|
||||||
var url = string.Format("{0}/web/timerdelete?sRef={1}&begin={2}&end={3}", baseUrl, sRef, begin, end);
|
var url = string.Format("{0}/web/timerdelete?sRef={1}&begin={2}&end={3}", baseUrl, sRef, begin, end);
|
||||||
UtilsHelper.DebugInformation(_logger, string.Format("[VuPlus] CancelTimerAsync url: {0}", url));
|
UtilsHelper.DebugInformation(_logger, string.Format("[Enigma2] CancelTimerAsync url: {0}", url));
|
||||||
|
|
||||||
using (var stream = await _httpClient.GetStreamAsync(url, cancellationToken).ConfigureAwait(false))
|
using (var stream = await _httpClient.GetStreamAsync(url, cancellationToken).ConfigureAwait(false))
|
||||||
{
|
{
|
||||||
using (var reader = new StreamReader(stream))
|
using (var reader = new StreamReader(stream))
|
||||||
{
|
{
|
||||||
var xmlResponse = reader.ReadToEnd();
|
var xmlResponse = reader.ReadToEnd();
|
||||||
UtilsHelper.DebugInformation(_logger, string.Format("[VuPlus] CancelTimerAsync response: {0}", xmlResponse));
|
UtilsHelper.DebugInformation(_logger, string.Format("[Enigma2] CancelTimerAsync response: {0}", xmlResponse));
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
@@ -864,16 +864,16 @@ namespace MediaBrowser.Plugins.VuPlus
|
|||||||
|
|
||||||
if (e2state != "True")
|
if (e2state != "True")
|
||||||
{
|
{
|
||||||
_logger.LogError("[VuPlus] Failed to cancel timer.");
|
_logger.LogError("[Enigma2] Failed to cancel timer.");
|
||||||
_logger.LogError(string.Format("[VuPlus] CancelTimerAsync e2statetext: {0}", e2statetext));
|
_logger.LogError(string.Format("[Enigma2] CancelTimerAsync e2statetext: {0}", e2statetext));
|
||||||
throw new ApplicationException("Failed to cancel timer.");
|
throw new ApplicationException("Failed to cancel timer.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
_logger.LogError("[VuPlus] Failed to parse cancel timer information.");
|
_logger.LogError("[Enigma2] Failed to parse cancel timer information.");
|
||||||
_logger.LogError(string.Format("[VuPlus] CancelTimerAsync error: {0}", e.Message));
|
_logger.LogError(string.Format("[Enigma2] CancelTimerAsync error: {0}", e.Message));
|
||||||
throw new ApplicationException("Failed to parse cancel timer information.");
|
throw new ApplicationException("Failed to parse cancel timer information.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -889,7 +889,7 @@ namespace MediaBrowser.Plugins.VuPlus
|
|||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public async Task CreateTimerAsync(TimerInfo info, CancellationToken cancellationToken)
|
public async Task CreateTimerAsync(TimerInfo info, CancellationToken cancellationToken)
|
||||||
{
|
{
|
||||||
_logger.LogInformation(string.Format("[VuPlus] Start CreateTimerAsync for ChannelId: {0} & Name: {1}", info.ChannelId, info.Name));
|
_logger.LogInformation(string.Format("[Enigma2] Start CreateTimerAsync for ChannelId: {0} & Name: {1}", info.ChannelId, info.Name));
|
||||||
await EnsureConnectionAsync(cancellationToken).ConfigureAwait(false);
|
await EnsureConnectionAsync(cancellationToken).ConfigureAwait(false);
|
||||||
|
|
||||||
// extract eventid from info.ProgramId
|
// extract eventid from info.ProgramId
|
||||||
@@ -911,14 +911,14 @@ namespace MediaBrowser.Plugins.VuPlus
|
|||||||
url = url + string.Format("&dirname={0}", WebUtility.UrlEncode(Plugin.Instance.Configuration.RecordingPath));
|
url = url + string.Format("&dirname={0}", WebUtility.UrlEncode(Plugin.Instance.Configuration.RecordingPath));
|
||||||
}
|
}
|
||||||
|
|
||||||
UtilsHelper.DebugInformation(_logger, string.Format("[VuPlus] CreateTimerAsync url: {0}", url));
|
UtilsHelper.DebugInformation(_logger, string.Format("[Enigma2] CreateTimerAsync url: {0}", url));
|
||||||
|
|
||||||
using (var stream = await _httpClient.GetStreamAsync(url, cancellationToken).ConfigureAwait(false))
|
using (var stream = await _httpClient.GetStreamAsync(url, cancellationToken).ConfigureAwait(false))
|
||||||
{
|
{
|
||||||
using (var reader = new StreamReader(stream))
|
using (var reader = new StreamReader(stream))
|
||||||
{
|
{
|
||||||
var xmlResponse = reader.ReadToEnd();
|
var xmlResponse = reader.ReadToEnd();
|
||||||
UtilsHelper.DebugInformation(_logger, string.Format("[VuPlus] CancelTimerAsync response: {0}", xmlResponse));
|
UtilsHelper.DebugInformation(_logger, string.Format("[Enigma2] CancelTimerAsync response: {0}", xmlResponse));
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
@@ -947,16 +947,16 @@ namespace MediaBrowser.Plugins.VuPlus
|
|||||||
|
|
||||||
if (e2state != "True")
|
if (e2state != "True")
|
||||||
{
|
{
|
||||||
_logger.LogError("[VuPlus] Failed to create timer.");
|
_logger.LogError("[Enigma2] Failed to create timer.");
|
||||||
_logger.LogError(string.Format("[VuPlus] CreateTimerAsync e2statetext: {0}", e2statetext));
|
_logger.LogError(string.Format("[Enigma2] CreateTimerAsync e2statetext: {0}", e2statetext));
|
||||||
throw new ApplicationException("Failed to create timer.");
|
throw new ApplicationException("Failed to create timer.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
_logger.LogError("[VuPlus] Failed to parse create timer information.");
|
_logger.LogError("[Enigma2] Failed to parse create timer information.");
|
||||||
_logger.LogError(string.Format("[VuPlus] CreateTimerAsync error: {0}", e.Message));
|
_logger.LogError(string.Format("[Enigma2] CreateTimerAsync error: {0}", e.Message));
|
||||||
throw new ApplicationException("Failed to parse create timer information.");
|
throw new ApplicationException("Failed to parse create timer information.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -971,7 +971,7 @@ namespace MediaBrowser.Plugins.VuPlus
|
|||||||
/// <returns>IEnumerable<TimerInfo></returns>
|
/// <returns>IEnumerable<TimerInfo></returns>
|
||||||
public async Task<IEnumerable<TimerInfo>> GetTimersAsync(CancellationToken cancellationToken)
|
public async Task<IEnumerable<TimerInfo>> GetTimersAsync(CancellationToken cancellationToken)
|
||||||
{
|
{
|
||||||
_logger.LogInformation("[VuPlus] Start GetTimerAsync, retrieve the 'Pending' recordings");
|
_logger.LogInformation("[Enigma2] Start GetTimerAsync, retrieve the 'Pending' recordings");
|
||||||
await EnsureConnectionAsync(cancellationToken).ConfigureAwait(false);
|
await EnsureConnectionAsync(cancellationToken).ConfigureAwait(false);
|
||||||
|
|
||||||
var protocol = "http";
|
var protocol = "http";
|
||||||
@@ -983,14 +983,14 @@ namespace MediaBrowser.Plugins.VuPlus
|
|||||||
var baseUrl = protocol + "://" + Plugin.Instance.Configuration.HostName + ":" + Plugin.Instance.Configuration.WebInterfacePort;
|
var baseUrl = protocol + "://" + Plugin.Instance.Configuration.HostName + ":" + Plugin.Instance.Configuration.WebInterfacePort;
|
||||||
|
|
||||||
var url = string.Format("{0}/web/timerlist", baseUrl);
|
var url = string.Format("{0}/web/timerlist", baseUrl);
|
||||||
UtilsHelper.DebugInformation(_logger, string.Format("[VuPlus] GetTimersAsync url: {0}", url));
|
UtilsHelper.DebugInformation(_logger, string.Format("[Enigma2] GetTimersAsync url: {0}", url));
|
||||||
|
|
||||||
using (var stream = await _httpClient.GetStreamAsync(url, cancellationToken).ConfigureAwait(false))
|
using (var stream = await _httpClient.GetStreamAsync(url, cancellationToken).ConfigureAwait(false))
|
||||||
{
|
{
|
||||||
using (var reader = new StreamReader(stream))
|
using (var reader = new StreamReader(stream))
|
||||||
{
|
{
|
||||||
var xmlResponse = reader.ReadToEnd();
|
var xmlResponse = reader.ReadToEnd();
|
||||||
UtilsHelper.DebugInformation(_logger, string.Format("[VuPlus] GetTimersAsync response: {0}", xmlResponse));
|
UtilsHelper.DebugInformation(_logger, string.Format("[Enigma2] GetTimersAsync response: {0}", xmlResponse));
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
@@ -1087,15 +1087,15 @@ namespace MediaBrowser.Plugins.VuPlus
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
_logger.LogInformation("[VuPlus] ignoring timer " + e2name);
|
_logger.LogInformation("[Enigma2] ignoring timer " + e2name);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return timerInfos;
|
return timerInfos;
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
_logger.LogError("[VuPlus] Failed to parse timer information.");
|
_logger.LogError("[Enigma2] Failed to parse timer information.");
|
||||||
_logger.LogError(string.Format("[VuPlus] GetTimersAsync error: {0}", e.Message));
|
_logger.LogError(string.Format("[Enigma2] GetTimersAsync error: {0}", e.Message));
|
||||||
throw new ApplicationException("Failed to parse timer information.");
|
throw new ApplicationException("Failed to parse timer information.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1119,10 +1119,10 @@ namespace MediaBrowser.Plugins.VuPlus
|
|||||||
/// <returns>MediaSourceInfo</returns>
|
/// <returns>MediaSourceInfo</returns>
|
||||||
public async Task<MediaSourceInfo> GetChannelStream(string channelOid, string mediaSourceId, CancellationToken cancellationToken)
|
public async Task<MediaSourceInfo> GetChannelStream(string channelOid, string mediaSourceId, CancellationToken cancellationToken)
|
||||||
{
|
{
|
||||||
_logger.LogInformation("[VuPlus] Start GetChannelStream");
|
_logger.LogInformation("[Enigma2] Start GetChannelStream");
|
||||||
|
|
||||||
var protocol = "http";
|
var protocol = "http";
|
||||||
if (Plugin.Instance.Configuration.UseSecureHTTPS)
|
if (Plugin.Instance.Configuration.UseSecureHTTPSForStreams)
|
||||||
{
|
{
|
||||||
protocol = "https";
|
protocol = "https";
|
||||||
}
|
}
|
||||||
@@ -1135,9 +1135,14 @@ namespace MediaBrowser.Plugins.VuPlus
|
|||||||
await ZapToChannel(cancellationToken, channelOid).ConfigureAwait(false);
|
await ZapToChannel(cancellationToken, channelOid).ConfigureAwait(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
|
||||||
_liveStreams++;
|
_liveStreams++;
|
||||||
var streamUrl = string.Format("{0}/{1}", baseUrl, channelOid);
|
var streamUrl = string.Format("{0}/{1}", baseUrl, channelOid);
|
||||||
UtilsHelper.DebugInformation(_logger, string.Format("[VuPlus] GetChannelStream url: {0}", streamUrl));
|
UtilsHelper.DebugInformation(_logger, string.Format("[Enigma2] GetChannelStream url: {0}", streamUrl));
|
||||||
|
|
||||||
return new MediaSourceInfo
|
return new MediaSourceInfo
|
||||||
{
|
{
|
||||||
@@ -1176,7 +1181,7 @@ namespace MediaBrowser.Plugins.VuPlus
|
|||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public async Task ZapToChannel(CancellationToken cancellationToken, string channelOid)
|
public async Task ZapToChannel(CancellationToken cancellationToken, string channelOid)
|
||||||
{
|
{
|
||||||
_logger.LogInformation("[VuPlus] Start ZapToChannel");
|
_logger.LogInformation("[Enigma2] Start ZapToChannel");
|
||||||
await EnsureConnectionAsync(cancellationToken).ConfigureAwait(false);
|
await EnsureConnectionAsync(cancellationToken).ConfigureAwait(false);
|
||||||
|
|
||||||
var protocol = "http";
|
var protocol = "http";
|
||||||
@@ -1188,14 +1193,14 @@ namespace MediaBrowser.Plugins.VuPlus
|
|||||||
var baseUrl = protocol + "://" + Plugin.Instance.Configuration.HostName + ":" + Plugin.Instance.Configuration.WebInterfacePort;
|
var baseUrl = protocol + "://" + Plugin.Instance.Configuration.HostName + ":" + Plugin.Instance.Configuration.WebInterfacePort;
|
||||||
|
|
||||||
var url = string.Format("{0}/web/zap?sRef={1}", baseUrl, channelOid);
|
var url = string.Format("{0}/web/zap?sRef={1}", baseUrl, channelOid);
|
||||||
UtilsHelper.DebugInformation(_logger, string.Format("[VuPlus] ZapToChannel url: {0}", url));
|
UtilsHelper.DebugInformation(_logger, string.Format("[Enigma2] ZapToChannel url: {0}", url));
|
||||||
|
|
||||||
using (var stream = await _httpClient.GetStreamAsync(url, cancellationToken).ConfigureAwait(false))
|
using (var stream = await _httpClient.GetStreamAsync(url, cancellationToken).ConfigureAwait(false))
|
||||||
{
|
{
|
||||||
using (var reader = new StreamReader(stream))
|
using (var reader = new StreamReader(stream))
|
||||||
{
|
{
|
||||||
var xmlResponse = reader.ReadToEnd();
|
var xmlResponse = reader.ReadToEnd();
|
||||||
UtilsHelper.DebugInformation(_logger, string.Format("[VuPlus] ZapToChannel response: {0}", xmlResponse));
|
UtilsHelper.DebugInformation(_logger, string.Format("[Enigma2] ZapToChannel response: {0}", xmlResponse));
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
@@ -1224,16 +1229,16 @@ namespace MediaBrowser.Plugins.VuPlus
|
|||||||
|
|
||||||
if (e2state != "True")
|
if (e2state != "True")
|
||||||
{
|
{
|
||||||
_logger.LogError("[VuPlus] Failed to zap to channel.");
|
_logger.LogError("[Enigma2] Failed to zap to channel.");
|
||||||
_logger.LogError(string.Format("[VuPlus] ZapToChannel e2statetext: {0}", e2statetext));
|
_logger.LogError(string.Format("[Enigma2] ZapToChannel e2statetext: {0}", e2statetext));
|
||||||
throw new ApplicationException("Failed to zap to channel.");
|
throw new ApplicationException("Failed to zap to channel.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
_logger.LogError("[VuPlus] Failed to parse create timer information.");
|
_logger.LogError("[Enigma2] Failed to parse create timer information.");
|
||||||
_logger.LogError(string.Format("[VuPlus] ZapToChannel error: {0}", e.Message));
|
_logger.LogError(string.Format("[Enigma2] ZapToChannel error: {0}", e.Message));
|
||||||
throw new ApplicationException("Failed to parse zap to channel information.");
|
throw new ApplicationException("Failed to parse zap to channel information.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1251,7 +1256,7 @@ namespace MediaBrowser.Plugins.VuPlus
|
|||||||
/// <returns>SeriesTimerInfo</returns>
|
/// <returns>SeriesTimerInfo</returns>
|
||||||
public async Task<SeriesTimerInfo> GetNewTimerDefaultsAsync(CancellationToken cancellationToken, ProgramInfo program = null)
|
public async Task<SeriesTimerInfo> GetNewTimerDefaultsAsync(CancellationToken cancellationToken, ProgramInfo program = null)
|
||||||
{
|
{
|
||||||
_logger.LogInformation("[VuPlus] Start GetNewTimerDefaultsAsync");
|
_logger.LogInformation("[Enigma2] Start GetNewTimerDefaultsAsync");
|
||||||
|
|
||||||
var seriesTimerInfo = new SeriesTimerInfo();
|
var seriesTimerInfo = new SeriesTimerInfo();
|
||||||
|
|
||||||
@@ -1269,7 +1274,7 @@ namespace MediaBrowser.Plugins.VuPlus
|
|||||||
/// <returns>IEnumerable<ProgramInfo></returns>
|
/// <returns>IEnumerable<ProgramInfo></returns>
|
||||||
public async Task<IEnumerable<ProgramInfo>> GetProgramsAsync(string channelId, DateTime startDateUtc, DateTime endDateUtc, CancellationToken cancellationToken)
|
public async Task<IEnumerable<ProgramInfo>> GetProgramsAsync(string channelId, DateTime startDateUtc, DateTime endDateUtc, CancellationToken cancellationToken)
|
||||||
{
|
{
|
||||||
_logger.LogInformation("[VuPlus] Start GetProgramsAsync");
|
_logger.LogInformation("[Enigma2] Start GetProgramsAsync");
|
||||||
await EnsureConnectionAsync(cancellationToken).ConfigureAwait(false);
|
await EnsureConnectionAsync(cancellationToken).ConfigureAwait(false);
|
||||||
|
|
||||||
var rnd = new Random();
|
var rnd = new Random();
|
||||||
@@ -1286,14 +1291,14 @@ namespace MediaBrowser.Plugins.VuPlus
|
|||||||
var baseUrl = protocol + "://" + Plugin.Instance.Configuration.HostName + ":" + Plugin.Instance.Configuration.WebInterfacePort;
|
var baseUrl = protocol + "://" + Plugin.Instance.Configuration.HostName + ":" + Plugin.Instance.Configuration.WebInterfacePort;
|
||||||
|
|
||||||
var url = string.Format("{0}/web/epgservice?sRef={1}", baseUrl, channelId);
|
var url = string.Format("{0}/web/epgservice?sRef={1}", baseUrl, channelId);
|
||||||
UtilsHelper.DebugInformation(_logger, string.Format("[VuPlus] GetProgramsAsync url: {0}", url));
|
UtilsHelper.DebugInformation(_logger, string.Format("[Enigma2] GetProgramsAsync url: {0}", url));
|
||||||
|
|
||||||
using (var stream = await _httpClient.GetStreamAsync(url, cancellationToken).ConfigureAwait(false))
|
using (var stream = await _httpClient.GetStreamAsync(url, cancellationToken).ConfigureAwait(false))
|
||||||
{
|
{
|
||||||
using (var reader = new StreamReader(stream))
|
using (var reader = new StreamReader(stream))
|
||||||
{
|
{
|
||||||
var xmlResponse = reader.ReadToEnd();
|
var xmlResponse = reader.ReadToEnd();
|
||||||
UtilsHelper.DebugInformation(_logger, string.Format("[VuPlus] GetProgramsAsync response: {0}", xmlResponse));
|
UtilsHelper.DebugInformation(_logger, string.Format("[Enigma2] GetProgramsAsync response: {0}", xmlResponse));
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
@@ -1365,12 +1370,12 @@ namespace MediaBrowser.Plugins.VuPlus
|
|||||||
// Check whether the current element is within the time range passed
|
// Check whether the current element is within the time range passed
|
||||||
if (sdate > endDateUtc)
|
if (sdate > endDateUtc)
|
||||||
{
|
{
|
||||||
UtilsHelper.DebugInformation(_logger, string.Format("[VuPlus] GetProgramsAsync epc full ending without adding channel name : {0} program : {1}", e2eventservicename, e2eventtitle));
|
UtilsHelper.DebugInformation(_logger, string.Format("[Enigma2] GetProgramsAsync epc full ending without adding channel name : {0} program : {1}", e2eventservicename, e2eventtitle));
|
||||||
return programInfos;
|
return programInfos;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
UtilsHelper.DebugInformation(_logger, string.Format("[VuPlus] GetProgramsAsync adding program for channel name : {0} program : {1}", e2eventservicename, e2eventtitle));
|
UtilsHelper.DebugInformation(_logger, string.Format("[Enigma2] GetProgramsAsync adding program for channel name : {0} program : {1}", e2eventservicename, e2eventtitle));
|
||||||
//programInfo.HasImage = false;
|
//programInfo.HasImage = false;
|
||||||
//programInfo.ImagePath = null;
|
//programInfo.ImagePath = null;
|
||||||
//programInfo.ImageUrl = null;
|
//programInfo.ImageUrl = null;
|
||||||
@@ -1380,7 +1385,7 @@ namespace MediaBrowser.Plugins.VuPlus
|
|||||||
{
|
{
|
||||||
if (channelInfo.Name == e2eventservicename)
|
if (channelInfo.Name == e2eventservicename)
|
||||||
{
|
{
|
||||||
UtilsHelper.DebugInformation(_logger, string.Format("[VuPlus] GetProgramsAsync match on channel name : {0}", e2eventservicename));
|
UtilsHelper.DebugInformation(_logger, string.Format("[Enigma2] GetProgramsAsync match on channel name : {0}", e2eventservicename));
|
||||||
//programInfo.HasImage = true;
|
//programInfo.HasImage = true;
|
||||||
//programInfo.ImagePath = channelInfo.ImagePath;
|
//programInfo.ImagePath = channelInfo.ImagePath;
|
||||||
//programInfo.ImageUrl = channelInfo.ImageUrl;
|
//programInfo.ImageUrl = channelInfo.ImageUrl;
|
||||||
@@ -1436,8 +1441,8 @@ namespace MediaBrowser.Plugins.VuPlus
|
|||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
_logger.LogError("[VuPlus] Failed to parse program information.");
|
_logger.LogError("[Enigma2] Failed to parse program information.");
|
||||||
_logger.LogError(string.Format("[VuPlus] GetProgramsAsync error: {0}", e.Message));
|
_logger.LogError(string.Format("[Enigma2] GetProgramsAsync error: {0}", e.Message));
|
||||||
throw new ApplicationException("Failed to parse channel information.");
|
throw new ApplicationException("Failed to parse channel information.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1452,7 +1457,7 @@ namespace MediaBrowser.Plugins.VuPlus
|
|||||||
/// <returns>LiveTvServiceStatusInfo</returns>
|
/// <returns>LiveTvServiceStatusInfo</returns>
|
||||||
public async Task<LiveTvServiceStatusInfo> GetStatusInfoAsync(CancellationToken cancellationToken)
|
public async Task<LiveTvServiceStatusInfo> GetStatusInfoAsync(CancellationToken cancellationToken)
|
||||||
{
|
{
|
||||||
_logger.LogInformation("[VuPlus] Start GetStatusInfoAsync Async, retrieve status details");
|
_logger.LogInformation("[Enigma2] Start GetStatusInfoAsync Async, retrieve status details");
|
||||||
await EnsureConnectionAsync(cancellationToken).ConfigureAwait(false);
|
await EnsureConnectionAsync(cancellationToken).ConfigureAwait(false);
|
||||||
|
|
||||||
//TODO: Version check
|
//TODO: Version check
|
||||||
@@ -1469,7 +1474,7 @@ namespace MediaBrowser.Plugins.VuPlus
|
|||||||
var baseUrl = protocol + "://" + Plugin.Instance.Configuration.HostName + ":" + Plugin.Instance.Configuration.WebInterfacePort;
|
var baseUrl = protocol + "://" + Plugin.Instance.Configuration.HostName + ":" + Plugin.Instance.Configuration.WebInterfacePort;
|
||||||
|
|
||||||
var url = string.Format("{0}/web/deviceinfo", baseUrl);
|
var url = string.Format("{0}/web/deviceinfo", baseUrl);
|
||||||
UtilsHelper.DebugInformation(_logger, string.Format("[VuPlus] GetStatusInfoAsync url: {0}", url));
|
UtilsHelper.DebugInformation(_logger, string.Format("[Enigma2] GetStatusInfoAsync url: {0}", url));
|
||||||
|
|
||||||
var liveTvTunerInfos = new List<LiveTvTunerInfo>();
|
var liveTvTunerInfos = new List<LiveTvTunerInfo>();
|
||||||
|
|
||||||
@@ -1478,7 +1483,7 @@ namespace MediaBrowser.Plugins.VuPlus
|
|||||||
using (var reader = new StreamReader(stream))
|
using (var reader = new StreamReader(stream))
|
||||||
{
|
{
|
||||||
var xmlResponse = reader.ReadToEnd();
|
var xmlResponse = reader.ReadToEnd();
|
||||||
UtilsHelper.DebugInformation(_logger, string.Format("[VuPlus] GetStatusInfoAsync response: {0}", xmlResponse));
|
UtilsHelper.DebugInformation(_logger, string.Format("[Enigma2] GetStatusInfoAsync response: {0}", xmlResponse));
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
@@ -1522,8 +1527,8 @@ namespace MediaBrowser.Plugins.VuPlus
|
|||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
_logger.LogError("[VuPlus] Failed to parse tuner information.");
|
_logger.LogError("[Enigma2] Failed to parse tuner information.");
|
||||||
_logger.LogError(string.Format("[VuPlus] GetStatusInfoAsync error: {0}", e.Message));
|
_logger.LogError(string.Format("[Enigma2] GetStatusInfoAsync error: {0}", e.Message));
|
||||||
throw new ApplicationException("Failed to parse tuner information.");
|
throw new ApplicationException("Failed to parse tuner information.");
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1536,14 +1541,14 @@ namespace MediaBrowser.Plugins.VuPlus
|
|||||||
/// Gets the homepage url.
|
/// Gets the homepage url.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <value>The homepage url.</value>
|
/// <value>The homepage url.</value>
|
||||||
public string HomePageUrl => "http://www.VuPlus.com/";
|
public string HomePageUrl => "https://github.com/oe-alliance";
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the name.
|
/// Gets the name.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <value>The name.</value>
|
/// <value>The name.</value>
|
||||||
public string Name => "VuPlus";
|
public string Name => "Enigma2";
|
||||||
|
|
||||||
|
|
||||||
public async Task<MediaSourceInfo> GetRecordingStream(string recordingId, string mediaSourceId, CancellationToken cancellationToken)
|
public async Task<MediaSourceInfo> GetRecordingStream(string recordingId, string mediaSourceId, CancellationToken cancellationToken)
|
||||||
@@ -1560,7 +1565,7 @@ namespace MediaBrowser.Plugins.VuPlus
|
|||||||
|
|
||||||
public async Task CopyFilesAsync(StreamReader source, StreamWriter destination)
|
public async Task CopyFilesAsync(StreamReader source, StreamWriter destination)
|
||||||
{
|
{
|
||||||
_logger.LogInformation("[VuPlus] Start CopyFiles Async");
|
_logger.LogInformation("[Enigma2] Start CopyFiles Async");
|
||||||
var buffer = new char[0x1000];
|
var buffer = new char[0x1000];
|
||||||
int numRead;
|
int numRead;
|
||||||
while ((numRead = await source.ReadAsync(buffer, 0, buffer.Length)) != 0)
|
while ((numRead = await source.ReadAsync(buffer, 0, buffer.Length)) != 0)
|
||||||
@@ -1583,7 +1588,7 @@ namespace MediaBrowser.Plugins.VuPlus
|
|||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public async Task<IEnumerable<SeriesTimerInfo>> GetSeriesTimersAsync(CancellationToken cancellationToken)
|
public async Task<IEnumerable<SeriesTimerInfo>> GetSeriesTimersAsync(CancellationToken cancellationToken)
|
||||||
{
|
{
|
||||||
_logger.LogInformation("[VuPlus] Start GetSeriesTimersAsync");
|
_logger.LogInformation("[Enigma2] Start GetSeriesTimersAsync");
|
||||||
|
|
||||||
var seriesTimerInfo = new List<SeriesTimerInfo>();
|
var seriesTimerInfo = new List<SeriesTimerInfo>();
|
||||||
return seriesTimerInfo;
|
return seriesTimerInfo;
|
||||||
@@ -4,9 +4,9 @@ using MediaBrowser.Common.Configuration;
|
|||||||
using MediaBrowser.Common.Plugins;
|
using MediaBrowser.Common.Plugins;
|
||||||
using MediaBrowser.Model.Plugins;
|
using MediaBrowser.Model.Plugins;
|
||||||
using MediaBrowser.Model.Serialization;
|
using MediaBrowser.Model.Serialization;
|
||||||
using MediaBrowser.Plugins.VuPlus.Configuration;
|
using Jellyfin.Plugin.Enigma2.Configuration;
|
||||||
|
|
||||||
namespace MediaBrowser.Plugins.VuPlus
|
namespace Jellyfin.Plugin.Enigma2
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Class Plugin
|
/// Class Plugin
|
||||||
@@ -25,15 +25,15 @@ namespace MediaBrowser.Plugins.VuPlus
|
|||||||
/// Gets the name of the plugin
|
/// Gets the name of the plugin
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <value>The name.</value>
|
/// <value>The name.</value>
|
||||||
public override string Name => "VuPlus";
|
public override string Name => "Enigma2";
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the description.
|
/// Gets the description.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <value>The description.</value>
|
/// <value>The description.</value>
|
||||||
public override string Description => "Provides live tv using Vu+ / Enigma2 pvr as a back-end.";
|
public override string Description => "Provides live TV using Enigma2 PVR as a back-end.";
|
||||||
|
|
||||||
private Guid _id = new Guid("9564ac10-af23-39bc-449f-624f23cfa48f");
|
private Guid _id = new Guid("193f29f9-ea6c-4595-a6f6-55e79d7c590a");
|
||||||
public override Guid Id => _id;
|
public override Guid Id => _id;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -48,8 +48,8 @@ namespace MediaBrowser.Plugins.VuPlus
|
|||||||
{
|
{
|
||||||
new PluginPageInfo
|
new PluginPageInfo
|
||||||
{
|
{
|
||||||
Name = "vuplus",
|
Name = "enigma2",
|
||||||
EmbeddedResourcePath = "MediaBrowser.Plugins.VuPlus.Configuration.configPage.html"
|
EmbeddedResourcePath = "Jellyfin.Plugin.Enigma2.Configuration.configPage.html"
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
+19
-22
@@ -15,7 +15,7 @@ using MediaBrowser.Model.Entities;
|
|||||||
using MediaBrowser.Model.LiveTv;
|
using MediaBrowser.Model.LiveTv;
|
||||||
using MediaBrowser.Model.MediaInfo;
|
using MediaBrowser.Model.MediaInfo;
|
||||||
|
|
||||||
namespace MediaBrowser.Plugins.VuPlus
|
namespace Jellyfin.Plugin.Enigma2
|
||||||
{
|
{
|
||||||
public class RecordingsChannel : IChannel, IHasCacheKey, ISupportsDelete, ISupportsLatestMedia, ISupportsMediaProbe, IHasFolderAttributes
|
public class RecordingsChannel : IChannel, IHasCacheKey, ISupportsDelete, ISupportsLatestMedia, ISupportsMediaProbe, IHasFolderAttributes
|
||||||
{
|
{
|
||||||
@@ -26,11 +26,11 @@ namespace MediaBrowser.Plugins.VuPlus
|
|||||||
_liveTvManager = liveTvManager;
|
_liveTvManager = liveTvManager;
|
||||||
}
|
}
|
||||||
|
|
||||||
public string Name => "VuPlus Recordings";
|
public string Name => "Enigma2 Recordings";
|
||||||
|
|
||||||
public string[] Attributes => new[] { "Recordings" };
|
public string[] Attributes => new[] { "Recordings" };
|
||||||
|
|
||||||
public string Description => "VuPlus Recordings";
|
public string Description => "Enigma2 Recordings";
|
||||||
|
|
||||||
public string DataVersion => "1";
|
public string DataVersion => "1";
|
||||||
|
|
||||||
@@ -181,14 +181,10 @@ namespace MediaBrowser.Plugins.VuPlus
|
|||||||
var service = GetService();
|
var service = GetService();
|
||||||
var allRecordings = await service.GetAllRecordingsAsync(cancellationToken).ConfigureAwait(false);
|
var allRecordings = await service.GetAllRecordingsAsync(cancellationToken).ConfigureAwait(false);
|
||||||
|
|
||||||
var result = new ChannelItemResult()
|
return new ChannelItemResult()
|
||||||
{
|
{
|
||||||
Items = new List<ChannelItemInfo>()
|
Items = allRecordings.Where(filter).Select(ConvertToChannelItem).ToList()
|
||||||
};
|
};
|
||||||
|
|
||||||
result.Items.AddRange(allRecordings.Where(filter).Select(ConvertToChannelItem));
|
|
||||||
|
|
||||||
return result;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private ChannelItemInfo ConvertToChannelItem(MyRecordingInfo item)
|
private ChannelItemInfo ConvertToChannelItem(MyRecordingInfo item)
|
||||||
@@ -207,7 +203,7 @@ namespace MediaBrowser.Plugins.VuPlus
|
|||||||
//HomePageUrl = item.HomePageUrl
|
//HomePageUrl = item.HomePageUrl
|
||||||
Id = item.Id,
|
Id = item.Id,
|
||||||
//IndexNumber = item.IndexNumber,
|
//IndexNumber = item.IndexNumber,
|
||||||
MediaType = item.ChannelType == Model.LiveTv.ChannelType.TV ? ChannelMediaType.Video : ChannelMediaType.Audio,
|
MediaType = item.ChannelType == ChannelType.TV ? ChannelMediaType.Video : ChannelMediaType.Audio,
|
||||||
MediaSources = new List<MediaSourceInfo>
|
MediaSources = new List<MediaSourceInfo>
|
||||||
{
|
{
|
||||||
new MediaSourceInfo
|
new MediaSourceInfo
|
||||||
@@ -225,7 +221,7 @@ namespace MediaBrowser.Plugins.VuPlus
|
|||||||
DateModified = item.DateLastUpdated,
|
DateModified = item.DateLastUpdated,
|
||||||
Overview = item.Overview,
|
Overview = item.Overview,
|
||||||
//People = item.People
|
//People = item.People
|
||||||
IsLiveStream = item.Status == Model.LiveTv.RecordingStatus.InProgress,
|
IsLiveStream = item.Status == RecordingStatus.InProgress,
|
||||||
Etag = item.Status.ToString()
|
Etag = item.Status.ToString()
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -237,16 +233,14 @@ namespace MediaBrowser.Plugins.VuPlus
|
|||||||
var service = GetService();
|
var service = GetService();
|
||||||
|
|
||||||
var allRecordings = await service.GetAllRecordingsAsync(cancellationToken).ConfigureAwait(false);
|
var allRecordings = await service.GetAllRecordingsAsync(cancellationToken).ConfigureAwait(false);
|
||||||
var result = new ChannelItemResult()
|
|
||||||
{
|
|
||||||
Items = new List<ChannelItemInfo>()
|
|
||||||
};
|
|
||||||
|
|
||||||
var series = allRecordings
|
var series = allRecordings
|
||||||
.Where(i => i.IsSeries)
|
.Where(i => i.IsSeries)
|
||||||
.ToLookup(i => i.Name, StringComparer.OrdinalIgnoreCase);
|
.ToLookup(i => i.Name, StringComparer.OrdinalIgnoreCase);
|
||||||
|
|
||||||
result.Items.AddRange(series.OrderBy(i => i.Key).Select(i => new ChannelItemInfo
|
var items = new List<ChannelItemInfo>();
|
||||||
|
|
||||||
|
items.AddRange(series.OrderBy(i => i.Key).Select(i => new ChannelItemInfo
|
||||||
{
|
{
|
||||||
Name = i.Key,
|
Name = i.Key,
|
||||||
FolderType = ChannelFolderType.Container,
|
FolderType = ChannelFolderType.Container,
|
||||||
@@ -259,7 +253,7 @@ namespace MediaBrowser.Plugins.VuPlus
|
|||||||
|
|
||||||
if (kids != null)
|
if (kids != null)
|
||||||
{
|
{
|
||||||
result.Items.Add(new ChannelItemInfo
|
items.Add(new ChannelItemInfo
|
||||||
{
|
{
|
||||||
Name = "Kids",
|
Name = "Kids",
|
||||||
FolderType = ChannelFolderType.Container,
|
FolderType = ChannelFolderType.Container,
|
||||||
@@ -272,7 +266,7 @@ namespace MediaBrowser.Plugins.VuPlus
|
|||||||
var movies = allRecordings.FirstOrDefault(i => i.IsMovie);
|
var movies = allRecordings.FirstOrDefault(i => i.IsMovie);
|
||||||
if (movies != null)
|
if (movies != null)
|
||||||
{
|
{
|
||||||
result.Items.Add(new ChannelItemInfo
|
items.Add(new ChannelItemInfo
|
||||||
{
|
{
|
||||||
Name = "Movies",
|
Name = "Movies",
|
||||||
FolderType = ChannelFolderType.Container,
|
FolderType = ChannelFolderType.Container,
|
||||||
@@ -285,7 +279,7 @@ namespace MediaBrowser.Plugins.VuPlus
|
|||||||
var news = allRecordings.FirstOrDefault(i => i.IsNews);
|
var news = allRecordings.FirstOrDefault(i => i.IsNews);
|
||||||
if (news != null)
|
if (news != null)
|
||||||
{
|
{
|
||||||
result.Items.Add(new ChannelItemInfo
|
items.Add(new ChannelItemInfo
|
||||||
{
|
{
|
||||||
Name = "News",
|
Name = "News",
|
||||||
FolderType = ChannelFolderType.Container,
|
FolderType = ChannelFolderType.Container,
|
||||||
@@ -298,7 +292,7 @@ namespace MediaBrowser.Plugins.VuPlus
|
|||||||
var sports = allRecordings.FirstOrDefault(i => i.IsSports);
|
var sports = allRecordings.FirstOrDefault(i => i.IsSports);
|
||||||
if (sports != null)
|
if (sports != null)
|
||||||
{
|
{
|
||||||
result.Items.Add(new ChannelItemInfo
|
items.Add(new ChannelItemInfo
|
||||||
{
|
{
|
||||||
Name = "Sports",
|
Name = "Sports",
|
||||||
FolderType = ChannelFolderType.Container,
|
FolderType = ChannelFolderType.Container,
|
||||||
@@ -311,7 +305,7 @@ namespace MediaBrowser.Plugins.VuPlus
|
|||||||
var other = allRecordings.FirstOrDefault(i => !i.IsSports && !i.IsNews && !i.IsMovie && !i.IsKids && !i.IsSeries);
|
var other = allRecordings.FirstOrDefault(i => !i.IsSports && !i.IsNews && !i.IsMovie && !i.IsKids && !i.IsSeries);
|
||||||
if (other != null)
|
if (other != null)
|
||||||
{
|
{
|
||||||
result.Items.Add(new ChannelItemInfo
|
items.Add(new ChannelItemInfo
|
||||||
{
|
{
|
||||||
Name = "Others",
|
Name = "Others",
|
||||||
FolderType = ChannelFolderType.Container,
|
FolderType = ChannelFolderType.Container,
|
||||||
@@ -321,7 +315,10 @@ namespace MediaBrowser.Plugins.VuPlus
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
return result;
|
return new ChannelItemResult()
|
||||||
|
{
|
||||||
|
Items = items
|
||||||
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public class MyRecordingInfo
|
public class MyRecordingInfo
|
||||||
+8
-8
@@ -1,27 +1,27 @@
|
|||||||
---
|
---
|
||||||
# The name of the plugin; official plugins always start "jellyfin-plugin-"
|
# The name of the plugin; official plugins always start "jellyfin-plugin-"
|
||||||
name: "jellyfin-plugin-vuplus"
|
name: "jellyfin-plugin-enigma2"
|
||||||
|
|
||||||
# The GUID of the plugin, found in Plugin.cs
|
# The GUID of the plugin, found in Plugin.cs
|
||||||
guid: "9564ac10-af23-39bc-449f-624f23cfa48f"
|
guid: "193f29f9-ea6c-4595-a6f6-55e79d7c590a"
|
||||||
|
|
||||||
# The version of the plugin, starting at 1. Note that the AssemblyVersion
|
# The version of the plugin, starting at 1. Note that the AssemblyVersion
|
||||||
# and FileVersion flags in the `.csproj` file must have two additional
|
# and FileVersion flags in the `.csproj` file must have two additional
|
||||||
# fiels, e.g. 1.0.0 to be built correctly.
|
# fiels, e.g. 1.0.0 to be built correctly.
|
||||||
version: "4.0.0.0" # Please increment with each pull request
|
version: "5.0.0.0" # Please increment with each pull request
|
||||||
|
|
||||||
# The supported Jellyfin version, usually the earliest binary-compatible
|
# The supported Jellyfin version, usually the earliest binary-compatible
|
||||||
# version. Based on the Jellyfin components from NuGet.
|
# version. Based on the Jellyfin components from NuGet.
|
||||||
targetAbi: "10.7.0.0" # The earliest binary-compatible version
|
targetAbi: "10.8.0.0" # The earliest binary-compatible version
|
||||||
|
|
||||||
framework: "net5.0"
|
framework: "net6.0"
|
||||||
|
|
||||||
# The owner name of the plugin, "jellyfin" for official plugins. Change
|
# The owner name of the plugin, "jellyfin" for official plugins. Change
|
||||||
# to your own name if you wish to remain a 3rd-party plugin.
|
# to your own name if you wish to remain a 3rd-party plugin.
|
||||||
owner: "knackebrot"
|
owner: "knackebrot"
|
||||||
|
|
||||||
# A short description of the plugin
|
# A short description of the plugin
|
||||||
overview: "VU+"
|
overview: "Enigma2"
|
||||||
|
|
||||||
# A longer and more detailed description of the plugin; use multiple
|
# A longer and more detailed description of the plugin; use multiple
|
||||||
# lines as required for readability.
|
# lines as required for readability.
|
||||||
@@ -35,10 +35,10 @@ category: "Live TV"
|
|||||||
# Include the main output file, as well as any dependency `.dll`s that
|
# Include the main output file, as well as any dependency `.dll`s that
|
||||||
# might be required for the plugin to run.
|
# might be required for the plugin to run.
|
||||||
artifacts:
|
artifacts:
|
||||||
- "MediaBrowser.Plugins.VuPlus.dll"
|
- "Jellyfin.Plugin.Enigma2.dll"
|
||||||
|
|
||||||
# Build information values for the build infrastructure; these should
|
# Build information values for the build infrastructure; these should
|
||||||
# not need to be changed usually.
|
# not need to be changed usually.
|
||||||
build_type: "dotnet"
|
build_type: "dotnet"
|
||||||
dotnet_configuration: "Release"
|
dotnet_configuration: "Release"
|
||||||
dotnet_framework: "net5.0"
|
dotnet_framework: "net6.0"
|
||||||
|
|||||||
Reference in New Issue
Block a user