diff options
Diffstat (limited to 'Emby.Server.Implementations/ApplicationHost.cs')
| -rw-r--r-- | Emby.Server.Implementations/ApplicationHost.cs | 53 |
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> |
