3.2.12.2
This commit is contained in:
parent
e56faea17a
commit
34c5aab607
|
@ -179,6 +179,11 @@ namespace Emby.Common.Implementations
|
|||
}
|
||||
}
|
||||
|
||||
public virtual PackageVersionClass SystemUpdateLevel
|
||||
{
|
||||
get { return PackageVersionClass.Release; }
|
||||
}
|
||||
|
||||
public virtual string OperatingSystemDisplayName
|
||||
{
|
||||
get { return EnvironmentInfo.OperatingSystemName; }
|
||||
|
|
|
@ -1366,7 +1366,7 @@ namespace Emby.Server.Core
|
|||
SupportsLibraryMonitor = true,
|
||||
EncoderLocationType = MediaEncoder.EncoderLocationType,
|
||||
SystemArchitecture = EnvironmentInfo.SystemArchitecture,
|
||||
SystemUpdateLevel = ConfigurationManager.CommonConfiguration.SystemUpdateLevel,
|
||||
SystemUpdateLevel = SystemUpdateLevel,
|
||||
PackageName = StartupOptions.GetOption("-package")
|
||||
};
|
||||
}
|
||||
|
@ -1591,7 +1591,7 @@ namespace Emby.Server.Core
|
|||
}
|
||||
catch (NotImplementedException)
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
@ -1632,7 +1632,7 @@ namespace Emby.Server.Core
|
|||
public override async Task<CheckForUpdateResult> CheckForApplicationUpdate(CancellationToken cancellationToken, IProgress<double> progress)
|
||||
{
|
||||
var cacheLength = TimeSpan.FromHours(3);
|
||||
var updateLevel = ConfigurationManager.CommonConfiguration.SystemUpdateLevel;
|
||||
var updateLevel = SystemUpdateLevel;
|
||||
|
||||
if (updateLevel == PackageVersionClass.Beta)
|
||||
{
|
||||
|
|
|
@ -270,9 +270,14 @@ namespace Emby.Server.Implementations.Updates
|
|||
}
|
||||
}
|
||||
|
||||
private PackageVersionClass GetSystemUpdateLevel()
|
||||
{
|
||||
return _applicationHost.SystemUpdateLevel;
|
||||
}
|
||||
|
||||
private TimeSpan GetCacheLength()
|
||||
{
|
||||
switch (_config.CommonConfiguration.SystemUpdateLevel)
|
||||
switch (GetSystemUpdateLevel())
|
||||
{
|
||||
case PackageVersionClass.Beta:
|
||||
return TimeSpan.FromMinutes(30);
|
||||
|
@ -424,10 +429,12 @@ namespace Emby.Server.Implementations.Updates
|
|||
.ToList();
|
||||
}
|
||||
|
||||
var systemUpdateLevel = GetSystemUpdateLevel();
|
||||
|
||||
// Figure out what needs to be installed
|
||||
var packages = plugins.Select(p =>
|
||||
{
|
||||
var latestPluginInfo = GetLatestCompatibleVersion(catalog, p.Name, p.Id.ToString(), applicationVersion, _config.CommonConfiguration.SystemUpdateLevel);
|
||||
var latestPluginInfo = GetLatestCompatibleVersion(catalog, p.Name, p.Id.ToString(), applicationVersion, systemUpdateLevel);
|
||||
|
||||
return latestPluginInfo != null && GetPackageVersion(latestPluginInfo) > p.Version ? latestPluginInfo : null;
|
||||
|
||||
|
|
|
@ -157,5 +157,7 @@ namespace MediaBrowser.Common
|
|||
/// <param name="type">The type.</param>
|
||||
/// <returns>System.Object.</returns>
|
||||
object CreateInstance(Type type);
|
||||
|
||||
PackageVersionClass SystemUpdateLevel { get; }
|
||||
}
|
||||
}
|
||||
|
|
|
@ -12,6 +12,8 @@ using MediaBrowser.IsoMounter;
|
|||
using MediaBrowser.Model.IO;
|
||||
using MediaBrowser.Model.Logging;
|
||||
using MediaBrowser.Model.System;
|
||||
using MediaBrowser.Model.Updates;
|
||||
using MediaBrowser.Server.Startup.Common;
|
||||
|
||||
namespace MediaBrowser.Server.Mono
|
||||
{
|
||||
|
@ -40,6 +42,11 @@ namespace MediaBrowser.Server.Mono
|
|||
return new SyncManager();
|
||||
}
|
||||
|
||||
public override PackageVersionClass SystemUpdateLevel
|
||||
{
|
||||
get { return UpdateLevelHelper.GetSystemUpdateLevel(ConfigurationManager); }
|
||||
}
|
||||
|
||||
protected override void RestartInternal()
|
||||
{
|
||||
MainClass.Restart(StartupOptions);
|
||||
|
|
|
@ -77,6 +77,7 @@
|
|||
<Compile Include="IO\MemoryStreamProvider.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="SystemEvents.cs" />
|
||||
<Compile Include="UpdateLevelHelper.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Emby.Drawing.ImageMagick\Emby.Drawing.ImageMagick.csproj">
|
||||
|
|
27
MediaBrowser.Server.Startup.Common/UpdateLevelHelper.cs
Normal file
27
MediaBrowser.Server.Startup.Common/UpdateLevelHelper.cs
Normal file
|
@ -0,0 +1,27 @@
|
|||
using System;
|
||||
using System.Configuration;
|
||||
using MediaBrowser.Common.Configuration;
|
||||
using MediaBrowser.Model.Updates;
|
||||
|
||||
namespace MediaBrowser.Server.Startup.Common
|
||||
{
|
||||
public static class UpdateLevelHelper
|
||||
{
|
||||
public static PackageVersionClass GetSystemUpdateLevel(IConfigurationManager config)
|
||||
{
|
||||
return config.CommonConfiguration.SystemUpdateLevel;
|
||||
//var configuredValue = ConfigurationManager.AppSettings["SystemUpdateLevel"];
|
||||
|
||||
//if (string.Equals(configuredValue, "Beta", StringComparison.OrdinalIgnoreCase))
|
||||
//{
|
||||
// return PackageVersionClass.Beta;
|
||||
//}
|
||||
//if (string.Equals(configuredValue, "Dev", StringComparison.OrdinalIgnoreCase))
|
||||
//{
|
||||
// return PackageVersionClass.Dev;
|
||||
//}
|
||||
|
||||
//return PackageVersionClass.Release;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -17,6 +17,8 @@ using MediaBrowser.Controller.Sync;
|
|||
using MediaBrowser.Model.IO;
|
||||
using MediaBrowser.Model.Logging;
|
||||
using MediaBrowser.Model.System;
|
||||
using MediaBrowser.Model.Updates;
|
||||
using MediaBrowser.Server.Startup.Common;
|
||||
using MediaBrowser.ServerApplication.Native;
|
||||
|
||||
namespace MediaBrowser.ServerApplication
|
||||
|
@ -53,6 +55,11 @@ namespace MediaBrowser.ServerApplication
|
|||
LoopUtil.Run(appName);
|
||||
}
|
||||
|
||||
public override PackageVersionClass SystemUpdateLevel
|
||||
{
|
||||
get { return UpdateLevelHelper.GetSystemUpdateLevel(ConfigurationManager); }
|
||||
}
|
||||
|
||||
protected override List<Assembly> GetAssembliesWithPartsInternal()
|
||||
{
|
||||
var list = new List<Assembly>();
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
using System.Reflection;
|
||||
|
||||
[assembly: AssemblyVersion("3.2.12.1")]
|
||||
[assembly: AssemblyVersion("3.2.12.2")]
|
||||
|
|
Loading…
Reference in New Issue
Block a user