diff options
Diffstat (limited to 'MediaBrowser.Server.Startup.Common')
| -rw-r--r-- | MediaBrowser.Server.Startup.Common/ApplicationHost.cs | 20 |
1 files changed, 5 insertions, 15 deletions
diff --git a/MediaBrowser.Server.Startup.Common/ApplicationHost.cs b/MediaBrowser.Server.Startup.Common/ApplicationHost.cs index 385dc1d81f..143a31624f 100644 --- a/MediaBrowser.Server.Startup.Common/ApplicationHost.cs +++ b/MediaBrowser.Server.Startup.Common/ApplicationHost.cs @@ -1301,30 +1301,20 @@ namespace MediaBrowser.Server.Startup.Common /// <returns>Task{CheckForUpdateResult}.</returns> public override Task<CheckForUpdateResult> CheckForApplicationUpdate(CancellationToken cancellationToken, IProgress<double> progress) { - var includePreRelease = false; var cacheLength = TimeSpan.FromHours(12); - var excludeSuffixes = new List<string>(); + var updateLevel = ConfigurationManager.CommonConfiguration.SystemUpdateLevel; - if (ConfigurationManager.CommonConfiguration.SystemUpdateLevel == PackageVersionClass.Release) + if (updateLevel == PackageVersionClass.Beta) { - // Shouldn't actually be needed due to the prerelease filter - excludeSuffixes.Add("-beta"); - excludeSuffixes.Add("-dev"); - } - else if (ConfigurationManager.CommonConfiguration.SystemUpdateLevel == PackageVersionClass.Beta) - { - excludeSuffixes.Add("-dev"); cacheLength = TimeSpan.FromHours(1); - includePreRelease = true; } - else if (ConfigurationManager.CommonConfiguration.SystemUpdateLevel == PackageVersionClass.Dev) + else if (updateLevel == PackageVersionClass.Dev) { cacheLength = TimeSpan.FromMinutes(5); - includePreRelease = true; } - return new GithubUpdater(HttpClient, JsonSerializer, cacheLength) - .CheckForUpdateResult("MediaBrowser", "Emby", ApplicationVersion, includePreRelease, excludeSuffixes.ToArray(), _releaseAssetFilename, "MBServer", "Mbserver.zip", cancellationToken); + return new GithubUpdater(HttpClient, JsonSerializer, cacheLength).CheckForUpdateResult("MediaBrowser", "Emby", ApplicationVersion, updateLevel, _releaseAssetFilename, + "MBServer", "Mbserver.zip", cancellationToken); } /// <summary> |
