adjust default setting for library monitor
This commit is contained in:
parent
3205913b2a
commit
4cf456925f
|
@ -182,6 +182,9 @@
|
||||||
<Compile Include="..\MediaBrowser.Model\Configuration\AccessSchedule.cs">
|
<Compile Include="..\MediaBrowser.Model\Configuration\AccessSchedule.cs">
|
||||||
<Link>Configuration\AccessSchedule.cs</Link>
|
<Link>Configuration\AccessSchedule.cs</Link>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
<Compile Include="..\MediaBrowser.Model\Configuration\AutoOnOff.cs">
|
||||||
|
<Link>Configuration\AutoOnOff.cs</Link>
|
||||||
|
</Compile>
|
||||||
<Compile Include="..\MediaBrowser.Model\Configuration\BaseApplicationConfiguration.cs">
|
<Compile Include="..\MediaBrowser.Model\Configuration\BaseApplicationConfiguration.cs">
|
||||||
<Link>Configuration\BaseApplicationConfiguration.cs</Link>
|
<Link>Configuration\BaseApplicationConfiguration.cs</Link>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
|
|
@ -147,6 +147,9 @@
|
||||||
<Compile Include="..\MediaBrowser.Model\Configuration\AccessSchedule.cs">
|
<Compile Include="..\MediaBrowser.Model\Configuration\AccessSchedule.cs">
|
||||||
<Link>Configuration\AccessSchedule.cs</Link>
|
<Link>Configuration\AccessSchedule.cs</Link>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
<Compile Include="..\MediaBrowser.Model\Configuration\AutoOnOff.cs">
|
||||||
|
<Link>Configuration\AutoOnOff.cs</Link>
|
||||||
|
</Compile>
|
||||||
<Compile Include="..\MediaBrowser.Model\Configuration\BaseApplicationConfiguration.cs">
|
<Compile Include="..\MediaBrowser.Model\Configuration\BaseApplicationConfiguration.cs">
|
||||||
<Link>Configuration\BaseApplicationConfiguration.cs</Link>
|
<Link>Configuration\BaseApplicationConfiguration.cs</Link>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
|
10
MediaBrowser.Model/Configuration/AutoOnOff.cs
Normal file
10
MediaBrowser.Model/Configuration/AutoOnOff.cs
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
|
||||||
|
namespace MediaBrowser.Model.Configuration
|
||||||
|
{
|
||||||
|
public enum AutoOnOff
|
||||||
|
{
|
||||||
|
Auto,
|
||||||
|
Enabled,
|
||||||
|
Disabled
|
||||||
|
}
|
||||||
|
}
|
|
@ -187,7 +187,6 @@ namespace MediaBrowser.Model.Configuration
|
||||||
|
|
||||||
public bool EnableAutomaticRestart { get; set; }
|
public bool EnableAutomaticRestart { get; set; }
|
||||||
|
|
||||||
public bool EnableRealtimeMonitor { get; set; }
|
|
||||||
public PathSubstitution[] PathSubstitutions { get; set; }
|
public PathSubstitution[] PathSubstitutions { get; set; }
|
||||||
|
|
||||||
public string ServerName { get; set; }
|
public string ServerName { get; set; }
|
||||||
|
@ -210,6 +209,8 @@ namespace MediaBrowser.Model.Configuration
|
||||||
|
|
||||||
public bool DenyIFrameEmbedding { get; set; }
|
public bool DenyIFrameEmbedding { get; set; }
|
||||||
|
|
||||||
|
public AutoOnOff EnableLibraryMonitor { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Initializes a new instance of the <see cref="ServerConfiguration" /> class.
|
/// Initializes a new instance of the <see cref="ServerConfiguration" /> class.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -236,6 +237,7 @@ namespace MediaBrowser.Model.Configuration
|
||||||
// 5 minutes
|
// 5 minutes
|
||||||
MinResumeDurationSeconds = 300;
|
MinResumeDurationSeconds = 300;
|
||||||
|
|
||||||
|
EnableLibraryMonitor = AutoOnOff.Auto;
|
||||||
RealtimeLibraryMonitorDelay = 40;
|
RealtimeLibraryMonitorDelay = 40;
|
||||||
|
|
||||||
EnableInternetProviders = true;
|
EnableInternetProviders = true;
|
||||||
|
@ -253,8 +255,6 @@ namespace MediaBrowser.Model.Configuration
|
||||||
|
|
||||||
SeasonZeroDisplayName = "Specials";
|
SeasonZeroDisplayName = "Specials";
|
||||||
|
|
||||||
EnableRealtimeMonitor = true;
|
|
||||||
|
|
||||||
UICulture = "en-us";
|
UICulture = "en-us";
|
||||||
|
|
||||||
PeopleMetadataOptions = new PeopleMetadataOptions();
|
PeopleMetadataOptions = new PeopleMetadataOptions();
|
||||||
|
|
|
@ -96,6 +96,7 @@
|
||||||
<Compile Include="Chapters\RemoteChapterResult.cs" />
|
<Compile Include="Chapters\RemoteChapterResult.cs" />
|
||||||
<Compile Include="Collections\CollectionCreationResult.cs" />
|
<Compile Include="Collections\CollectionCreationResult.cs" />
|
||||||
<Compile Include="Configuration\AccessSchedule.cs" />
|
<Compile Include="Configuration\AccessSchedule.cs" />
|
||||||
|
<Compile Include="Configuration\AutoOnOff.cs" />
|
||||||
<Compile Include="Configuration\ChannelOptions.cs" />
|
<Compile Include="Configuration\ChannelOptions.cs" />
|
||||||
<Compile Include="Configuration\ChapterOptions.cs" />
|
<Compile Include="Configuration\ChapterOptions.cs" />
|
||||||
<Compile Include="Configuration\CinemaModeConfiguration.cs" />
|
<Compile Include="Configuration\CinemaModeConfiguration.cs" />
|
||||||
|
|
|
@ -3,6 +3,7 @@ using MediaBrowser.Common.ScheduledTasks;
|
||||||
using MediaBrowser.Controller.Configuration;
|
using MediaBrowser.Controller.Configuration;
|
||||||
using MediaBrowser.Controller.Entities;
|
using MediaBrowser.Controller.Entities;
|
||||||
using MediaBrowser.Controller.Library;
|
using MediaBrowser.Controller.Library;
|
||||||
|
using MediaBrowser.Model.Configuration;
|
||||||
using MediaBrowser.Model.Logging;
|
using MediaBrowser.Model.Logging;
|
||||||
using MediaBrowser.Server.Implementations.ScheduledTasks;
|
using MediaBrowser.Server.Implementations.ScheduledTasks;
|
||||||
using Microsoft.Win32;
|
using Microsoft.Win32;
|
||||||
|
@ -147,9 +148,25 @@ namespace MediaBrowser.Server.Implementations.IO
|
||||||
Start();
|
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()
|
public void Start()
|
||||||
{
|
{
|
||||||
if (ConfigurationManager.Configuration.EnableRealtimeMonitor)
|
if (EnableLibraryMonitor)
|
||||||
{
|
{
|
||||||
StartInternal();
|
StartInternal();
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
|
|
||||||
//[assembly: AssemblyVersion("3.0.*")]
|
//[assembly: AssemblyVersion("3.0.*")]
|
||||||
[assembly: AssemblyVersion("3.0.5641.2")]
|
[assembly: AssemblyVersion("3.0.5641.3")]
|
||||||
|
|
Loading…
Reference in New Issue
Block a user