aboutsummaryrefslogtreecommitdiff
path: root/Emby.Server.Implementations/ApplicationHost.cs
diff options
context:
space:
mode:
authorAndrew Rabert <6550543+nvllsvm@users.noreply.github.com>2019-01-02 13:07:08 -0500
committerGitHub <noreply@github.com>2019-01-02 13:07:08 -0500
commit8e7a88335d7c6ce4a13328e52de0b549ed3ad788 (patch)
tree2fd35320ed9d072150af27e8555be7a10c919ff8 /Emby.Server.Implementations/ApplicationHost.cs
parentb756390887260ee329bd9b27f40b3855471c3fe0 (diff)
parentf1bf87665ffeefa0fd3e3a716312d02f20f56231 (diff)
Merge pull request #371 from Bond-009/update
Remove GitHub updater and don't trow exception in release
Diffstat (limited to 'Emby.Server.Implementations/ApplicationHost.cs')
-rw-r--r--Emby.Server.Implementations/ApplicationHost.cs53
1 files changed, 0 insertions, 53 deletions
diff --git a/Emby.Server.Implementations/ApplicationHost.cs b/Emby.Server.Implementations/ApplicationHost.cs
index 07705e9e4..3cc6151f1 100644
--- a/Emby.Server.Implementations/ApplicationHost.cs
+++ b/Emby.Server.Implementations/ApplicationHost.cs
@@ -368,7 +368,6 @@ namespace Emby.Server.Implementations
protected IAuthService AuthService { get; private set; }
public StartupOptions StartupOptions { get; private set; }
- protected readonly string ReleaseAssetFilename;
internal IPowerManagement PowerManagement { get; private set; }
internal IImageEncoder ImageEncoder { get; private set; }
@@ -393,7 +392,6 @@ namespace Emby.Server.Implementations
StartupOptions options,
IFileSystem fileSystem,
IPowerManagement powerManagement,
- string releaseAssetFilename,
IEnvironmentInfo environmentInfo,
IImageEncoder imageEncoder,
ISystemEvents systemEvents,
@@ -419,7 +417,6 @@ namespace Emby.Server.Implementations
Logger = LoggerFactory.CreateLogger("App");
StartupOptions = options;
- ReleaseAssetFilename = releaseAssetFilename;
PowerManagement = powerManagement;
ImageEncoder = imageEncoder;
@@ -2287,56 +2284,6 @@ namespace Emby.Server.Implementations
}
/// <summary>
- /// Checks for update.
- /// </summary>
- /// <param name="cancellationToken">The cancellation token.</param>
- /// <param name="progress">The progress.</param>
- /// <returns>Task{CheckForUpdateResult}.</returns>
- public async Task<CheckForUpdateResult> CheckForApplicationUpdate(CancellationToken cancellationToken, IProgress<double> progress)
- {
- var updateLevel = SystemUpdateLevel;
- var cacheLength = updateLevel == PackageVersionClass.Release ?
- TimeSpan.FromHours(12) :
- TimeSpan.FromMinutes(5);
-
- try
- {
- var result = await new GithubUpdater(HttpClient, JsonSerializer).CheckForUpdateResult("MediaBrowser",
- "Emby.Releases",
- ApplicationVersion,
- updateLevel,
- ReleaseAssetFilename,
- "MBServer",
- UpdateTargetFileName,
- cacheLength,
- cancellationToken).ConfigureAwait(false);
-
- HasUpdateAvailable = result.IsUpdateAvailable;
-
- return result;
- }
- catch (HttpException ex)
- {
- // users are overreacting to this occasionally failing
- if (ex.StatusCode.HasValue && ex.StatusCode.Value == HttpStatusCode.Forbidden)
- {
- HasUpdateAvailable = false;
- return new CheckForUpdateResult
- {
- IsUpdateAvailable = false
- };
- }
-
- throw;
- }
- }
-
- protected virtual string UpdateTargetFileName
- {
- get { return "Mbserver.zip"; }
- }
-
- /// <summary>
/// Updates the application.
/// </summary>
/// <param name="package">The package that contains the update</param>