mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-05-31 12:14:21 -04:00
Mark plugin failure on DI Loop.
This commit is contained in:
parent
d2d45295fc
commit
494ace7984
@ -406,6 +406,11 @@ namespace Emby.Server.Implementations
|
|||||||
Logger.LogError("Called from: {stack}", entry.FullName);
|
Logger.LogError("Called from: {stack}", entry.FullName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (type is IPlugin)
|
||||||
|
{
|
||||||
|
_pluginManager.FailPlugin(type.Assembly);
|
||||||
|
}
|
||||||
|
|
||||||
throw new ExternalException("DI Loop detected.");
|
throw new ExternalException("DI Loop detected.");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2,9 +2,7 @@ using System;
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.ComponentModel.DataAnnotations;
|
using System.ComponentModel.DataAnnotations;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Net.Mime;
|
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Jellyfin.Api.Attributes;
|
|
||||||
using Jellyfin.Api.Constants;
|
using Jellyfin.Api.Constants;
|
||||||
using MediaBrowser.Common.Json;
|
using MediaBrowser.Common.Json;
|
||||||
using MediaBrowser.Common.Updates;
|
using MediaBrowser.Common.Updates;
|
||||||
@ -46,6 +44,7 @@ namespace Jellyfin.Api.Controllers
|
|||||||
/// <returns>A <see cref="PackageInfo"/> containing package information.</returns>
|
/// <returns>A <see cref="PackageInfo"/> containing package information.</returns>
|
||||||
[HttpGet("Packages/{name}")]
|
[HttpGet("Packages/{name}")]
|
||||||
[ProducesResponseType(StatusCodes.Status200OK)]
|
[ProducesResponseType(StatusCodes.Status200OK)]
|
||||||
|
[Produces(JsonDefaults.CamelCaseMediaType)]
|
||||||
public async Task<ActionResult<PackageInfo>> GetPackageInfo(
|
public async Task<ActionResult<PackageInfo>> GetPackageInfo(
|
||||||
[FromRoute, Required] string name,
|
[FromRoute, Required] string name,
|
||||||
[FromQuery] Guid? assemblyGuid)
|
[FromQuery] Guid? assemblyGuid)
|
||||||
@ -72,6 +71,7 @@ namespace Jellyfin.Api.Controllers
|
|||||||
/// <returns>An <see cref="PackageInfo"/> containing available packages information.</returns>
|
/// <returns>An <see cref="PackageInfo"/> containing available packages information.</returns>
|
||||||
[HttpGet("Packages")]
|
[HttpGet("Packages")]
|
||||||
[ProducesResponseType(StatusCodes.Status200OK)]
|
[ProducesResponseType(StatusCodes.Status200OK)]
|
||||||
|
[Produces(JsonDefaults.CamelCaseMediaType)]
|
||||||
public async Task<IEnumerable<PackageInfo>> GetPackages()
|
public async Task<IEnumerable<PackageInfo>> GetPackages()
|
||||||
{
|
{
|
||||||
IEnumerable<PackageInfo> packages = await _installationManager.GetAvailablePackages().ConfigureAwait(false);
|
IEnumerable<PackageInfo> packages = await _installationManager.GetAvailablePackages().ConfigureAwait(false);
|
||||||
@ -146,6 +146,7 @@ namespace Jellyfin.Api.Controllers
|
|||||||
/// <returns>An <see cref="OkResult"/> containing the list of package repositories.</returns>
|
/// <returns>An <see cref="OkResult"/> containing the list of package repositories.</returns>
|
||||||
[HttpGet("Repositories")]
|
[HttpGet("Repositories")]
|
||||||
[ProducesResponseType(StatusCodes.Status200OK)]
|
[ProducesResponseType(StatusCodes.Status200OK)]
|
||||||
|
[Produces(JsonDefaults.CamelCaseMediaType)]
|
||||||
public ActionResult<IEnumerable<RepositoryInfo>> GetRepositories()
|
public ActionResult<IEnumerable<RepositoryInfo>> GetRepositories()
|
||||||
{
|
{
|
||||||
return _serverConfigurationManager.Configuration.PluginRepositories;
|
return _serverConfigurationManager.Configuration.PluginRepositories;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user