Merge pull request #6290 from Bond-009/update2
Remove old "has update available" code
This commit is contained in:
commit
b6006742fa
|
@ -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.Notifications
|
|||
return _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;
|
||||
|
|
|
@ -1102,7 +1102,6 @@ namespace Emby.Server.Implementations
|
|||
OperatingSystemDisplayName = OperatingSystem.Name,
|
||||
CanSelfRestart = CanSelfRestart,
|
||||
CanLaunchWebBrowser = CanLaunchWebBrowser,
|
||||
HasUpdateAvailable = HasUpdateAvailable,
|
||||
TranscodingTempPath = ConfigurationManager.GetTranscodePath(),
|
||||
ServerName = FriendlyName,
|
||||
LocalAddress = GetSmartApiUrl(source),
|
||||
|
@ -1252,26 +1251,6 @@ namespace Emby.Server.Implementations
|
|||
|
||||
protected 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 = _allConcreteTypes
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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; }
|
||||
|
|
Loading…
Reference in New Issue
Block a user