From d95057f13bb6d8bfe04ce20138f8cd2fc66c3519 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Tue, 28 Jul 2015 15:42:24 -0400 Subject: rework settings page --- MediaBrowser.Server.Implementations/IO/LibraryMonitor.cs | 16 ++++++++++++++-- .../Library/LibraryManager.cs | 15 +++++++++------ .../Localization/Core/core.json | 4 +--- 3 files changed, 24 insertions(+), 11 deletions(-) (limited to 'MediaBrowser.Server.Implementations') diff --git a/MediaBrowser.Server.Implementations/IO/LibraryMonitor.cs b/MediaBrowser.Server.Implementations/IO/LibraryMonitor.cs index d6a1be962..26ccdfc9a 100644 --- a/MediaBrowser.Server.Implementations/IO/LibraryMonitor.cs +++ b/MediaBrowser.Server.Implementations/IO/LibraryMonitor.cs @@ -1,4 +1,5 @@ -using MediaBrowser.Common.IO; +using System.ComponentModel; +using MediaBrowser.Common.IO; using MediaBrowser.Common.ScheduledTasks; using MediaBrowser.Controller.Configuration; using MediaBrowser.Controller.Entities; @@ -338,7 +339,7 @@ namespace MediaBrowser.Server.Implementations.IO } catch { - + } finally { @@ -370,6 +371,17 @@ namespace MediaBrowser.Server.Implementations.IO Logger.ErrorException("Error in Directory watcher for: " + dw.Path, ex); DisposeWatcher(dw); + + if (ex is Win32Exception) + { + Logger.Info("Disabling realtime monitor to prevent future instability"); + + if (ConfigurationManager.Configuration.EnableLibraryMonitor == AutoOnOff.Auto) + { + ConfigurationManager.Configuration.EnableLibraryMonitor = AutoOnOff.Disabled; + Stop(); + } + } } /// diff --git a/MediaBrowser.Server.Implementations/Library/LibraryManager.cs b/MediaBrowser.Server.Implementations/Library/LibraryManager.cs index 8d51e3e92..497a198fd 100644 --- a/MediaBrowser.Server.Implementations/Library/LibraryManager.cs +++ b/MediaBrowser.Server.Implementations/Library/LibraryManager.cs @@ -2071,14 +2071,17 @@ namespace MediaBrowser.Server.Implementations.Library public List GetPeople(BaseItem item) { - var people = GetPeople(new InternalPeopleQuery + if (item.SupportsPeople) { - ItemId = item.Id - }); + var people = GetPeople(new InternalPeopleQuery + { + ItemId = item.Id + }); - if (people.Count > 0) - { - return people; + if (people.Count > 0) + { + return people; + } } return item.People ?? new List(); diff --git a/MediaBrowser.Server.Implementations/Localization/Core/core.json b/MediaBrowser.Server.Implementations/Localization/Core/core.json index 44a10f0a9..4eb66929d 100644 --- a/MediaBrowser.Server.Implementations/Localization/Core/core.json +++ b/MediaBrowser.Server.Implementations/Localization/Core/core.json @@ -173,7 +173,5 @@ "HeaderProducer": "Producers", "HeaderWriter": "Writers", "HeaderParentalRatings": "Parental Ratings", - "HeaderCommunityRatings": "Community ratings", - - + "HeaderCommunityRatings": "Community ratings" } -- cgit v1.2.3