adjust default setting for library monitor

This commit is contained in:
Luke Pulverenti 2015-06-14 13:55:42 -04:00
parent 3205913b2a
commit 4cf456925f
7 changed files with 39 additions and 5 deletions

View File

@ -182,6 +182,9 @@
<Compile Include="..\MediaBrowser.Model\Configuration\AccessSchedule.cs">
<Link>Configuration\AccessSchedule.cs</Link>
</Compile>
<Compile Include="..\MediaBrowser.Model\Configuration\AutoOnOff.cs">
<Link>Configuration\AutoOnOff.cs</Link>
</Compile>
<Compile Include="..\MediaBrowser.Model\Configuration\BaseApplicationConfiguration.cs">
<Link>Configuration\BaseApplicationConfiguration.cs</Link>
</Compile>

View File

@ -147,6 +147,9 @@
<Compile Include="..\MediaBrowser.Model\Configuration\AccessSchedule.cs">
<Link>Configuration\AccessSchedule.cs</Link>
</Compile>
<Compile Include="..\MediaBrowser.Model\Configuration\AutoOnOff.cs">
<Link>Configuration\AutoOnOff.cs</Link>
</Compile>
<Compile Include="..\MediaBrowser.Model\Configuration\BaseApplicationConfiguration.cs">
<Link>Configuration\BaseApplicationConfiguration.cs</Link>
</Compile>

View File

@ -0,0 +1,10 @@

namespace MediaBrowser.Model.Configuration
{
public enum AutoOnOff
{
Auto,
Enabled,
Disabled
}
}

View File

@ -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; }
/// <summary>
/// Initializes a new instance of the <see cref="ServerConfiguration" /> class.
/// </summary>
@ -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();

View File

@ -96,6 +96,7 @@
<Compile Include="Chapters\RemoteChapterResult.cs" />
<Compile Include="Collections\CollectionCreationResult.cs" />
<Compile Include="Configuration\AccessSchedule.cs" />
<Compile Include="Configuration\AutoOnOff.cs" />
<Compile Include="Configuration\ChannelOptions.cs" />
<Compile Include="Configuration\ChapterOptions.cs" />
<Compile Include="Configuration\CinemaModeConfiguration.cs" />

View File

@ -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();
}

View File

@ -1,4 +1,4 @@
using System.Reflection;
//[assembly: AssemblyVersion("3.0.*")]
[assembly: AssemblyVersion("3.0.5641.2")]
[assembly: AssemblyVersion("3.0.5641.3")]