diff options
Diffstat (limited to 'Jellyfin.Api')
| -rw-r--r-- | Jellyfin.Api/Controllers/PackageController.cs | 10 | ||||
| -rw-r--r-- | Jellyfin.Api/Jellyfin.Api.csproj | 4 |
2 files changed, 11 insertions, 3 deletions
diff --git a/Jellyfin.Api/Controllers/PackageController.cs b/Jellyfin.Api/Controllers/PackageController.cs index eaf56aa563..1d9de14d2d 100644 --- a/Jellyfin.Api/Controllers/PackageController.cs +++ b/Jellyfin.Api/Controllers/PackageController.cs @@ -77,6 +77,7 @@ namespace Jellyfin.Api.Controllers /// <param name="name">Package name.</param> /// <param name="assemblyGuid">GUID of the associated assembly.</param> /// <param name="version">Optional version. Defaults to latest version.</param> + /// <param name="repositoryUrl">Optional. Specify the repository to install from.</param> /// <response code="204">Package found.</response> /// <response code="404">Package not found.</response> /// <returns>A <see cref="NoContentResult"/> on success, or a <see cref="NotFoundResult"/> if the package could not be found.</returns> @@ -87,9 +88,16 @@ namespace Jellyfin.Api.Controllers public async Task<ActionResult> InstallPackage( [FromRoute, Required] string name, [FromQuery] string? assemblyGuid, - [FromQuery] string? version) + [FromQuery] string? version, + [FromQuery] string? repositoryUrl) { var packages = await _installationManager.GetAvailablePackages().ConfigureAwait(false); + if (!string.IsNullOrEmpty(repositoryUrl)) + { + packages = packages.Where(p => p.repositoryUrl.Equals(repositoryUrl, StringComparison.OrdinalIgnoreCase)) + .ToList(); + } + var package = _installationManager.GetCompatibleVersions( packages, name, diff --git a/Jellyfin.Api/Jellyfin.Api.csproj b/Jellyfin.Api/Jellyfin.Api.csproj index c27dce8ddf..6a00db4b1a 100644 --- a/Jellyfin.Api/Jellyfin.Api.csproj +++ b/Jellyfin.Api/Jellyfin.Api.csproj @@ -17,8 +17,8 @@ <PackageReference Include="Microsoft.AspNetCore.Authorization" Version="3.1.8" /> <PackageReference Include="Microsoft.AspNetCore.Mvc" Version="2.2.0" /> <PackageReference Include="Microsoft.Extensions.Http" Version="3.1.8" /> - <PackageReference Include="Swashbuckle.AspNetCore" Version="5.5.1" /> - <PackageReference Include="Swashbuckle.AspNetCore.ReDoc" Version="5.5.1" /> + <PackageReference Include="Swashbuckle.AspNetCore" Version="5.6.3" /> + <PackageReference Include="Swashbuckle.AspNetCore.ReDoc" Version="5.6.3" /> </ItemGroup> <ItemGroup> |
