mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-12-18 06:53:07 +03:00
Merge pull request #4247 from crobibero/update-plugin
Update all on-disk plugins
This commit is contained in:
@@ -16,7 +16,7 @@ using MediaBrowser.Common.Configuration;
|
||||
using MediaBrowser.Common.Net;
|
||||
using MediaBrowser.Common.Plugins;
|
||||
using MediaBrowser.Common.Updates;
|
||||
using MediaBrowser.Common.System;
|
||||
using MediaBrowser.Controller;
|
||||
using MediaBrowser.Controller.Configuration;
|
||||
using MediaBrowser.Controller.Events;
|
||||
using MediaBrowser.Controller.Events.Updates;
|
||||
@@ -25,7 +25,6 @@ using MediaBrowser.Model.Net;
|
||||
using MediaBrowser.Model.Serialization;
|
||||
using MediaBrowser.Model.Updates;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using MediaBrowser.Model.System;
|
||||
|
||||
namespace Emby.Server.Implementations.Updates
|
||||
{
|
||||
@@ -49,7 +48,7 @@ namespace Emby.Server.Implementations.Updates
|
||||
/// Gets the application host.
|
||||
/// </summary>
|
||||
/// <value>The application host.</value>
|
||||
private readonly IApplicationHost _applicationHost;
|
||||
private readonly IServerApplicationHost _applicationHost;
|
||||
|
||||
private readonly IZipClient _zipClient;
|
||||
|
||||
@@ -67,7 +66,7 @@ namespace Emby.Server.Implementations.Updates
|
||||
|
||||
public InstallationManager(
|
||||
ILogger<InstallationManager> logger,
|
||||
IApplicationHost appHost,
|
||||
IServerApplicationHost appHost,
|
||||
IApplicationPaths appPaths,
|
||||
IEventManager eventManager,
|
||||
IHttpClientFactory httpClientFactory,
|
||||
@@ -217,7 +216,8 @@ namespace Emby.Server.Implementations.Updates
|
||||
|
||||
private IEnumerable<InstallationInfo> GetAvailablePluginUpdates(IReadOnlyList<PackageInfo> pluginCatalog)
|
||||
{
|
||||
foreach (var plugin in _applicationHost.Plugins)
|
||||
var plugins = _applicationHost.GetLocalPlugins(_appPaths.PluginsPath);
|
||||
foreach (var plugin in plugins)
|
||||
{
|
||||
var compatibleVersions = GetCompatibleVersions(pluginCatalog, plugin.Name, plugin.Id, minVersion: plugin.Version);
|
||||
var version = compatibleVersions.FirstOrDefault(y => y.Version > plugin.Version);
|
||||
|
||||
Reference in New Issue
Block a user