The Free Software Media System - Server Backend & API
Remove old "has update available" code
Bond_009b91c4be74c71
diff --git a/Emby.Notifications/NotificationEntryPoint.cs b/Emby.Notifications/NotificationEntryPoint.csindex 7433d3c8ae..e8ae14ff22 100644--- a/Emby.Notifications/NotificationEntryPoint.cs+++ b/Emby.Notifications/NotificationEntryPoint.cs@@ -77,7 +77,6 @@ namespace Emby.Notifications{_libraryManager.ItemAdded += OnLibraryManagerItemAdded;_appHost.HasPendingRestartChanged += OnAppHostHasPendingRestartChanged;- _appHost.HasUpdateAvailableChanged += OnAppHostHasUpdateAvailableChanged;_activityManager.EntryCreated += OnActivityManagerEntryCreated;return Task.CompletedTask;@@ -132,25 +131,6 @@ namespace Emby.Notificationsreturn _config.GetConfiguration<NotificationOptions>("notifications");}- private async void OnAppHostHasUpdateAvailableChanged(object? sender, EventArgs e)- {- if (!_appHost.HasUpdateAvailable)- {- return;- }-- var type = NotificationType.ApplicationUpdateAvailable.ToString();-- var notification = new NotificationRequest- {- Description = "Please see jellyfin.org for details.",- NotificationType = type,- Name = _localization.GetLocalizedString("NewVersionIsAvailable")- };-- await SendNotification(notification, null).ConfigureAwait(false);- }-private void OnLibraryManagerItemAdded(object? sender, ItemChangeEventArgs e){if (!FilterItem(e.Item))@@ -325,7 +305,6 @@ namespace Emby.Notifications_libraryManager.ItemAdded -= OnLibraryManagerItemAdded;_appHost.HasPendingRestartChanged -= OnAppHostHasPendingRestartChanged;- _appHost.HasUpdateAvailableChanged -= OnAppHostHasUpdateAvailableChanged;_activityManager.EntryCreated -= OnActivityManagerEntryCreated;_disposed = true;diff --git a/Emby.Server.Implementations/ApplicationHost.cs b/Emby.Server.Implementations/ApplicationHost.csindex 82995deb30..7ad7a27322 100644--- a/Emby.Server.Implementations/ApplicationHost.cs+++ b/Emby.Server.Implementations/ApplicationHost.cs@@ -1102,7 +1102,6 @@ namespace Emby.Server.ImplementationsOperatingSystemDisplayName = OperatingSystem.Name,CanSelfRestart = CanSelfRestart,CanLaunchWebBrowser = CanLaunchWebBrowser,- HasUpdateAvailable = HasUpdateAvailable,TranscodingTempPath = ConfigurationManager.GetTranscodePath(),ServerName = FriendlyName,LocalAddress = GetSmartApiUrl(source),@@ -1252,26 +1251,6 @@ namespace Emby.Server.Implementationsprotected abstract void ShutdownInternal();- public event EventHandler HasUpdateAvailableChanged;-- private bool _hasUpdateAvailable;-- public bool HasUpdateAvailable- {- get => _hasUpdateAvailable;- set- {- var fireEvent = value && !_hasUpdateAvailable;-- _hasUpdateAvailable = value;-- if (fireEvent)- {- HasUpdateAvailableChanged?.Invoke(this, EventArgs.Empty);- }- }- }-public IEnumerable<Assembly> GetApiPluginAssemblies(){var assemblies = _allConcreteTypesdiff --git a/MediaBrowser.Controller/IServerApplicationHost.cs b/MediaBrowser.Controller/IServerApplicationHost.csindex 0949238426..753c18bc7e 100644--- a/MediaBrowser.Controller/IServerApplicationHost.cs+++ b/MediaBrowser.Controller/IServerApplicationHost.cs@@ -16,8 +16,6 @@ namespace MediaBrowser.Controller/// </summary>public interface IServerApplicationHost : IApplicationHost{- event EventHandler HasUpdateAvailableChanged;-bool CoreStartupHasCompleted { get; }bool CanLaunchWebBrowser { get; }@@ -39,12 +37,6 @@ namespace MediaBrowser.Controller/// </summary>bool ListenWithHttps { get; }- /// <summary>- /// Gets a value indicating whether this instance has update available.- /// </summary>- /// <value><c>true</c> if this instance has update available; otherwise, <c>false</c>.</value>- bool HasUpdateAvailable { get; }-/// <summary>/// Gets the name of the friendly./// </summary>diff --git a/MediaBrowser.Model/System/SystemInfo.cs b/MediaBrowser.Model/System/SystemInfo.csindex d75ae91c02..e45b2f33a6 100644--- a/MediaBrowser.Model/System/SystemInfo.cs+++ b/MediaBrowser.Model/System/SystemInfo.cs@@ -130,6 +130,7 @@ namespace MediaBrowser.Model.System/// Gets or sets a value indicating whether this instance has update available./// </summary>/// <value><c>true</c> if this instance has update available; otherwise, <c>false</c>.</value>+ [Obsolete("This should be handled by the package manager")]public bool HasUpdateAvailable { get; set; }public FFmpegLocation EncoderLocation { get; set; }