diff --git a/MediaBrowser.Model.Portable/MediaBrowser.Model.Portable.csproj b/MediaBrowser.Model.Portable/MediaBrowser.Model.Portable.csproj index a2fb14517..3238e79b7 100644 --- a/MediaBrowser.Model.Portable/MediaBrowser.Model.Portable.csproj +++ b/MediaBrowser.Model.Portable/MediaBrowser.Model.Portable.csproj @@ -182,6 +182,9 @@ Configuration\AccessSchedule.cs + + Configuration\AutoOnOff.cs + Configuration\BaseApplicationConfiguration.cs diff --git a/MediaBrowser.Model.net35/MediaBrowser.Model.net35.csproj b/MediaBrowser.Model.net35/MediaBrowser.Model.net35.csproj index 0cb8e5ca2..be7277607 100644 --- a/MediaBrowser.Model.net35/MediaBrowser.Model.net35.csproj +++ b/MediaBrowser.Model.net35/MediaBrowser.Model.net35.csproj @@ -147,6 +147,9 @@ Configuration\AccessSchedule.cs + + Configuration\AutoOnOff.cs + Configuration\BaseApplicationConfiguration.cs diff --git a/MediaBrowser.Model/Configuration/AutoOnOff.cs b/MediaBrowser.Model/Configuration/AutoOnOff.cs new file mode 100644 index 000000000..e911a0ff1 --- /dev/null +++ b/MediaBrowser.Model/Configuration/AutoOnOff.cs @@ -0,0 +1,10 @@ + +namespace MediaBrowser.Model.Configuration +{ + public enum AutoOnOff + { + Auto, + Enabled, + Disabled + } +} diff --git a/MediaBrowser.Model/Configuration/ServerConfiguration.cs b/MediaBrowser.Model/Configuration/ServerConfiguration.cs index ec9e6e10f..f1d6bbcae 100644 --- a/MediaBrowser.Model/Configuration/ServerConfiguration.cs +++ b/MediaBrowser.Model/Configuration/ServerConfiguration.cs @@ -187,7 +187,6 @@ namespace MediaBrowser.Model.Configuration public bool EnableAutomaticRestart { get; set; } - public bool EnableRealtimeMonitor { get; set; } public PathSubstitution[] PathSubstitutions { get; set; } public string ServerName { get; set; } @@ -210,6 +209,8 @@ namespace MediaBrowser.Model.Configuration public bool DenyIFrameEmbedding { get; set; } + public AutoOnOff EnableLibraryMonitor { get; set; } + /// /// Initializes a new instance of the class. /// @@ -236,6 +237,7 @@ namespace MediaBrowser.Model.Configuration // 5 minutes MinResumeDurationSeconds = 300; + EnableLibraryMonitor = AutoOnOff.Auto; RealtimeLibraryMonitorDelay = 40; EnableInternetProviders = true; @@ -253,8 +255,6 @@ namespace MediaBrowser.Model.Configuration SeasonZeroDisplayName = "Specials"; - EnableRealtimeMonitor = true; - UICulture = "en-us"; PeopleMetadataOptions = new PeopleMetadataOptions(); diff --git a/MediaBrowser.Model/MediaBrowser.Model.csproj b/MediaBrowser.Model/MediaBrowser.Model.csproj index df3cd15f6..3daacdd73 100644 --- a/MediaBrowser.Model/MediaBrowser.Model.csproj +++ b/MediaBrowser.Model/MediaBrowser.Model.csproj @@ -96,6 +96,7 @@ + diff --git a/MediaBrowser.Server.Implementations/IO/LibraryMonitor.cs b/MediaBrowser.Server.Implementations/IO/LibraryMonitor.cs index ba5d10eef..d6a1be962 100644 --- a/MediaBrowser.Server.Implementations/IO/LibraryMonitor.cs +++ b/MediaBrowser.Server.Implementations/IO/LibraryMonitor.cs @@ -3,6 +3,7 @@ using MediaBrowser.Common.ScheduledTasks; using MediaBrowser.Controller.Configuration; using MediaBrowser.Controller.Entities; using MediaBrowser.Controller.Library; +using MediaBrowser.Model.Configuration; using MediaBrowser.Model.Logging; using MediaBrowser.Server.Implementations.ScheduledTasks; using Microsoft.Win32; @@ -147,9 +148,25 @@ namespace MediaBrowser.Server.Implementations.IO Start(); } + private bool EnableLibraryMonitor + { + get + { + switch (ConfigurationManager.Configuration.EnableLibraryMonitor) + { + case AutoOnOff.Auto: + return Environment.OSVersion.Platform == PlatformID.Win32NT; + case AutoOnOff.Enabled: + return true; + default: + return false; + } + } + } + public void Start() { - if (ConfigurationManager.Configuration.EnableRealtimeMonitor) + if (EnableLibraryMonitor) { StartInternal(); } diff --git a/SharedVersion.cs b/SharedVersion.cs index d1f70ad19..0478d2aae 100644 --- a/SharedVersion.cs +++ b/SharedVersion.cs @@ -1,4 +1,4 @@ using System.Reflection; //[assembly: AssemblyVersion("3.0.*")] -[assembly: AssemblyVersion("3.0.5641.2")] +[assembly: AssemblyVersion("3.0.5641.3")]