From 7ac9bd6d5bb10a80a1e2593fb21863b4bc755c73 Mon Sep 17 00:00:00 2001 From: PrplHaz4 Date: Wed, 16 Oct 2019 15:12:51 -0400 Subject: [PATCH 1/5] bump version to 2 --- build.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.yaml b/build.yaml index c44a78c..596277b 100644 --- a/build.yaml +++ b/build.yaml @@ -1,7 +1,7 @@ --- name: "jellyfin-plugin-serverwmc" guid: "1fc322a1-af2e-49a5-b2eb-a89b4240f700" -version: "1" # Please increment with each pull request +version: "2" # Please increment with each pull request jellyfin_version: "10.3.0" # The earliest binary-compatible version nicename: "ServerWMC" description: "Jellyfin LiveTV plugin for Windows MediaCenter with ServerWMC" From 40713bdfacb06410aaa577436b1771f6d7b344dd Mon Sep 17 00:00:00 2001 From: PrplHaz4 Date: Wed, 16 Oct 2019 15:13:54 -0400 Subject: [PATCH 2/5] use linuxpath set in plugin config fixes #4 --- Jellyfin.Plugin.ServerWMC/WMCService.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jellyfin.Plugin.ServerWMC/WMCService.cs b/Jellyfin.Plugin.ServerWMC/WMCService.cs index 11e90a2..9844524 100644 --- a/Jellyfin.Plugin.ServerWMC/WMCService.cs +++ b/Jellyfin.Plugin.ServerWMC/WMCService.cs @@ -76,7 +76,7 @@ public WMCService(IHttpClient httpClient, IFileSystem fileSystem, ILoggerFactory //Thread.Sleep(20000); - _linuxPath = null; // linux path obsoleted in .net core + _linuxPath = Plugin.Instance.Configuration.LinuxPath; // read newest serverwmc build from autoupdate site var newBuild = GetNewestSWMCBuild(); From 3af34aaa6100d131b7f4d1de2b15afb376cc6952 Mon Sep 17 00:00:00 2001 From: PrplHaz4 Date: Wed, 16 Oct 2019 15:28:41 -0400 Subject: [PATCH 3/5] prefix log entries with [ServerWMC] --- Jellyfin.Plugin.ServerWMC/WMCService.cs | 38 ++++++++++++------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/Jellyfin.Plugin.ServerWMC/WMCService.cs b/Jellyfin.Plugin.ServerWMC/WMCService.cs index 9844524..d2dc559 100644 --- a/Jellyfin.Plugin.ServerWMC/WMCService.cs +++ b/Jellyfin.Plugin.ServerWMC/WMCService.cs @@ -69,7 +69,7 @@ public WMCService(IHttpClient httpClient, IFileSystem fileSystem, ILoggerFactory _clientVersion = Assembly.GetExecutingAssembly().GetName().Version.ToString(); SocketClientAsync.InitAddress(Plugin.Instance.Configuration.ServerIP, Plugin.Instance.Configuration.ServerPort); // set ip and port - _logger.LogInformation("Config IP: {0} ({1}), Config Port: {2}", + _logger.LogInformation("[ServerWMC] Config IP: {0} ({1}), Config Port: {2}", Plugin.Instance.Configuration.ServerIP, SocketClientAsync.IpAddr, Plugin.Instance.Configuration.ServerPort); @@ -81,11 +81,11 @@ public WMCService(IHttpClient httpClient, IFileSystem fileSystem, ILoggerFactory // read newest serverwmc build from autoupdate site var newBuild = GetNewestSWMCBuild(); if (newBuild == 0) - _logger.LogInformation("Using last hardcoded build value: " + _newestBuild); + _logger.LogInformation("[ServerWMC] Using last hardcoded build value: " + _newestBuild); else { _newestBuild = newBuild; - _logger.LogInformation("Newest ServerWMC build value found: " + _newestBuild); + _logger.LogInformation("[ServerWMC] Newest ServerWMC build value found: " + _newestBuild); } _fileSystem = fileSystem; // for file access, not used currently @@ -205,7 +205,7 @@ public int GetNewestSWMCBuild() } catch (Exception ex) { - _logger.LogError("Failed check for checking for newest ServerWMC version number: " + ex); + _logger.LogError("[ServerWMC] Failed check for checking for newest ServerWMC version number: " + ex); return 0; } } @@ -517,12 +517,12 @@ MediaStream GetMediaStream(string str) } } else - _logger.LogError("GetMediaStream> Prop name: " + propName + " not found"); + _logger.LogError("[ServerWMC] GetMediaStream> Prop name: " + propName + " not found"); } } catch (Exception ex) { - _logger.LogError("GetMediaStream> Media stream parse error: {0}", ex); + _logger.LogError("[ServerWMC] GetMediaStream> Media stream parse error: {0}", ex); } } return ms; @@ -582,7 +582,7 @@ public async Task GetChannelStream(string channelId, string tra } else // tell server file was not accesible and throw an error { - _logger.LogError("GetChannelStream> stream file not found: {0}", strm); + _logger.LogError("[ServerWMC] GetChannelStream> stream file not found: {0}", strm); // tell server stream did not start await SocketClientAsync.GetVectorAsync(XferString("StreamStartError", strm), cancellationToken, streamId); throw new Exception("ServerWMC: Stream file not not found: " + strm); @@ -724,7 +724,7 @@ public async Task> GetChannelsAsync(System.Threading.Ca } catch (Exception ex) { - _logger.LogError("GetChannelsAsync> " + ex); + _logger.LogError("[ServerWMC] GetChannelsAsync> " + ex); throw ex; } @@ -797,7 +797,7 @@ public async Task CreateTimerAsync(TimerInfo info, System.Threading.Cancellation if (DateTimeOffset.UtcNow >= info.EndDate) { - _logger.LogError("CreateTimerAsync> requested program '{0}' has already aired; EndTime(UTC): {1}, CurrentTime(UTC): {2}", info.Name, info.EndDate, DateTimeOffset.UtcNow); + _logger.LogError("[ServerWMC] CreateTimerAsync> requested program '{0}' has already aired; EndTime(UTC): {1}, CurrentTime(UTC): {2}", info.Name, info.EndDate, DateTimeOffset.UtcNow); throw new Exception("ServerWMC: Can't record: program occurs in the past"); } @@ -822,7 +822,7 @@ public async Task CreateTimerAsync(TimerInfo info, System.Threading.Cancellation { LastRecordingChange = DateTimeOffset.UtcNow; - _logger.LogInformation("CreateTimerAsync> recording added for timer '{0}', status {1}", info.Name, info.Status); + _logger.LogInformation("[ServerWMC] CreateTimerAsync> recording added for timer '{0}', status {1}", info.Name, info.Status); if (responses.Length > 1) // if there is extra results sent from server... { @@ -836,15 +836,15 @@ public async Task CreateTimerAsync(TimerInfo info, System.Threading.Cancellation } else if (splitResult[0] == "recordingChannel") // service picked a different channel for timer { - _logger.LogInformation("CreateTimerAsync> timer channel changed by wmc to '{0}'", splitResult[1]); + _logger.LogInformation("[ServerWMC] CreateTimerAsync> timer channel changed by wmc to '{0}'", splitResult[1]); } else if (splitResult[0] == "recordingTime") // service picked a different start time for timer { - _logger.LogInformation("CreateTimerAsync> timer start time changed by wmc to '{0}'", splitResult[1]); + _logger.LogInformation("[ServerWMC] CreateTimerAsync> timer start time changed by wmc to '{0}'", splitResult[1]); } else if (splitResult[0] == "increasedEndTime") // end time has been increased on an instant record { - _logger.LogInformation("CreateTimerAsync> instant record end time increased by '{0}' minutes", splitResult[1]); + _logger.LogInformation("[ServerWMC] CreateTimerAsync> instant record end time increased by '{0}' minutes", splitResult[1]); } } } @@ -961,7 +961,7 @@ public async Task> GetTimersAsync(System.Threading.Cancel } catch (Exception ex) { - _logger.LogError("GetTimersAsync> " + ex); + _logger.LogError("[ServerWMC] GetTimersAsync> " + ex); throw ex; } @@ -1015,7 +1015,7 @@ public async Task> GetSeriesTimersAsync(System.Thre } catch (Exception ex) { - _logger.LogError("GetSeriesTimersAsync> " + ex); + _logger.LogError("[ServerWMC] GetSeriesTimersAsync> " + ex); throw ex; } @@ -1144,7 +1144,7 @@ public async Task GetRecordingStream(string recordingId, string } else // tell server file was not accesible and throw an error { - _logger.LogError("GetRecordingStream> stream file not found: {0}", strmFile); + _logger.LogError("[ServerWMC] GetRecordingStream> stream file not found: {0}", strmFile); // tell server stream did not start await SocketClientAsync.GetVectorAsync(XferString("StreamStartError", strmFile), cancellationToken, streamId); throw new Exception("ServerWMC: Stream file not not found: " + strmFile); @@ -1315,7 +1315,7 @@ public async Task> GetAllRecordingsAsync(System.Thr } catch (Exception ex) { - _logger.LogError("GetRecordingsAsync> " + ex.Message); + _logger.LogError("[ServerWMC] GetRecordingsAsync> " + ex.Message); throw ex; } @@ -1410,7 +1410,7 @@ public async Task> GetProgramsAsync(string channelId, D } catch (Exception ex) { - _logger.LogError("GetProgramsAsync> " + ex.Message); + _logger.LogError("[ServerWMC] GetProgramsAsync> " + ex.Message); throw ex; } @@ -1503,7 +1503,7 @@ public async Task GetStatusInfoAsync(CancellationToken } catch (Exception ex) { - _logger.LogError("GetStatusInfoAsync::TunerStatus> " + ex.Message); + _logger.LogError("[ServerWMC] GetStatusInfoAsync::TunerStatus> " + ex.Message); throw ex; } #endregion From 410e72d12e9c49d3d24ff1c5eb50b8f4d847c27c Mon Sep 17 00:00:00 2001 From: PrplHaz4 Date: Thu, 17 Oct 2019 00:50:43 -0400 Subject: [PATCH 4/5] fixes #5 config saving, bump assembly --- .../Configuration/PluginConfiguration.cs | 2 +- .../Configuration/configPage.html | 82 +++++-------------- .../Jellyfin.Plugin.ServerWMC.csproj | 4 +- 3 files changed, 24 insertions(+), 64 deletions(-) diff --git a/Jellyfin.Plugin.ServerWMC/Configuration/PluginConfiguration.cs b/Jellyfin.Plugin.ServerWMC/Configuration/PluginConfiguration.cs index 43c774e..2400a40 100644 --- a/Jellyfin.Plugin.ServerWMC/Configuration/PluginConfiguration.cs +++ b/Jellyfin.Plugin.ServerWMC/Configuration/PluginConfiguration.cs @@ -26,7 +26,7 @@ public class PluginConfiguration : BasePluginConfiguration /// /// Initializes a new instance of the class. /// - public PluginConfiguration() : base() + public PluginConfiguration() { ServerIP = "localhost"; ServerPort = 9080; diff --git a/Jellyfin.Plugin.ServerWMC/Configuration/configPage.html b/Jellyfin.Plugin.ServerWMC/Configuration/configPage.html index d974c2a..399a6c1 100644 --- a/Jellyfin.Plugin.ServerWMC/Configuration/configPage.html +++ b/Jellyfin.Plugin.ServerWMC/Configuration/configPage.html @@ -4,31 +4,12 @@ ServerWMC -
- +
-
    -
  • - - ServerWMC app is required for this plugin, download installer here - -

    - The ServerWMC app needs to be running on the machine that has WMC installed and configured, but the WMC app does not need to be running to use the program. -

    -

    - If Jellyfin Server is running on a different machine than ServerWMC, make sure that the 'Recorded TV' folder that is used for new recordings is shared on the network (see 'Folders' tab in ServerWMC), and make sure the Jellyfin Server can access this folder. -

    -
  • -
  • - - -
    - The ip address or name of your ServerWMC machine +
  • @@ -60,49 +41,28 @@