aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Server.Startup.Common
diff options
context:
space:
mode:
authorLuke Pulverenti <luke.pulverenti@gmail.com>2016-01-03 21:31:22 -0500
committerLuke Pulverenti <luke.pulverenti@gmail.com>2016-01-08 21:01:04 -0500
commite0e4ebb0bb24865830e3f8d5eef9eb5a79f5684b (patch)
tree4070bf05a1d78e68a45975d310a4d0d5e6156133 /MediaBrowser.Server.Startup.Common
parent614edab79f6fa8e04c07bd232dca68df9c773c34 (diff)
update the updater
Diffstat (limited to 'MediaBrowser.Server.Startup.Common')
-rw-r--r--MediaBrowser.Server.Startup.Common/ApplicationHost.cs20
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>