From ab79129d0c9ea8026d95c8421b8e27f8661cc4c1 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Thu, 15 Sep 2016 16:30:46 -0400 Subject: [PATCH 1/3] add library monitor error handling --- MediaBrowser.Server.Implementations/IO/LibraryMonitor.cs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/MediaBrowser.Server.Implementations/IO/LibraryMonitor.cs b/MediaBrowser.Server.Implementations/IO/LibraryMonitor.cs index 80364bb55..8bb40a00e 100644 --- a/MediaBrowser.Server.Implementations/IO/LibraryMonitor.cs +++ b/MediaBrowser.Server.Implementations/IO/LibraryMonitor.cs @@ -106,7 +106,14 @@ namespace MediaBrowser.Server.Implementations.IO if (refreshPath) { - ReportFileSystemChanged(path); + try + { + ReportFileSystemChanged(path); + } + catch (Exception ex) + { + Logger.ErrorException("Error in ReportFileSystemChanged for {0}", ex, path); + } } } From 3ad2703c35ef6872eee169d5892bf80b9573a484 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Thu, 15 Sep 2016 16:31:08 -0400 Subject: [PATCH 2/3] add guide data error handling --- .../LiveTv/Listings/SchedulesDirect.cs | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/MediaBrowser.Server.Implementations/LiveTv/Listings/SchedulesDirect.cs b/MediaBrowser.Server.Implementations/LiveTv/Listings/SchedulesDirect.cs index 6d2f79fa0..d863c4587 100644 --- a/MediaBrowser.Server.Implementations/LiveTv/Listings/SchedulesDirect.cs +++ b/MediaBrowser.Server.Implementations/LiveTv/Listings/SchedulesDirect.cs @@ -349,9 +349,14 @@ namespace MediaBrowser.Server.Implementations.LiveTv.Listings channelNumber = channelNumber.TrimStart('0'); _logger.Debug("Found channel: " + channelNumber + " in Schedules Direct"); - var schChannel = root.stations.FirstOrDefault(item => item.stationID == map.stationID); - - AddToChannelPairCache(listingsId, channelNumber, schChannel); + if (root.stations != null) + { + var schChannel = root.stations.FirstOrDefault(item => string.Equals(item.stationID, map.stationID, StringComparison.OrdinalIgnoreCase)); + if (schChannel != null) + { + AddToChannelPairCache(listingsId, channelNumber, schChannel); + } + } } _logger.Info("Added " + GetChannelPairCacheCount(listingsId) + " channels to the dictionary"); From 9e661daf83a44799844b0fda8c304efb6a0ed311 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Thu, 15 Sep 2016 16:32:49 -0400 Subject: [PATCH 3/3] update multicast loopback handling --- MediaBrowser.Dlna/Main/DlnaEntryPoint.cs | 14 +------------- MediaBrowser.WebDashboard/Api/PackageCreator.cs | 2 +- 2 files changed, 2 insertions(+), 14 deletions(-) diff --git a/MediaBrowser.Dlna/Main/DlnaEntryPoint.cs b/MediaBrowser.Dlna/Main/DlnaEntryPoint.cs index faf293f6b..b1205710a 100644 --- a/MediaBrowser.Dlna/Main/DlnaEntryPoint.cs +++ b/MediaBrowser.Dlna/Main/DlnaEntryPoint.cs @@ -110,18 +110,6 @@ namespace MediaBrowser.Dlna.Main { var options = _config.GetDlnaConfiguration(); - if (!options.EnableServer && !options.EnablePlayTo && !_config.Configuration.EnableUPnP) - { - if (_ssdpHandlerStarted) - { - // Sat/ip live tv depends on device discovery, as well as hd homerun detection - // In order to allow this to be disabled, we need a modular way of knowing if there are - // any parts of the system that are dependant on it - // DisposeSsdpHandler(); - } - return; - } - if (!_ssdpHandlerStarted) { StartSsdpHandler(); @@ -231,7 +219,7 @@ namespace MediaBrowser.Dlna.Main return; } - var cacheLength = _config.GetDlnaConfiguration().BlastAliveMessageIntervalSeconds*2; + var cacheLength = _config.GetDlnaConfiguration().BlastAliveMessageIntervalSeconds * 2; _Publisher.SupportPnpRootDevice = true; foreach (var address in await _appHost.GetLocalIpAddresses().ConfigureAwait(false)) diff --git a/MediaBrowser.WebDashboard/Api/PackageCreator.cs b/MediaBrowser.WebDashboard/Api/PackageCreator.cs index e7247a11f..02e8ad6f2 100644 --- a/MediaBrowser.WebDashboard/Api/PackageCreator.cs +++ b/MediaBrowser.WebDashboard/Api/PackageCreator.cs @@ -346,7 +346,7 @@ namespace MediaBrowser.WebDashboard.Api if (string.Equals(mode, "cordova", StringComparison.OrdinalIgnoreCase)) { - sb.Append(""); + sb.Append(""); } else {