|
|
|
@ -2,9 +2,7 @@ using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.ComponentModel.DataAnnotations;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Net.Mime;
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
using Jellyfin.Api.Attributes;
|
|
|
|
|
using Jellyfin.Api.Constants;
|
|
|
|
|
using MediaBrowser.Common.Json;
|
|
|
|
|
using MediaBrowser.Common.Updates;
|
|
|
|
@ -46,6 +44,7 @@ namespace Jellyfin.Api.Controllers
|
|
|
|
|
/// <returns>A <see cref="PackageInfo"/> containing package information.</returns>
|
|
|
|
|
[HttpGet("Packages/{name}")]
|
|
|
|
|
[ProducesResponseType(StatusCodes.Status200OK)]
|
|
|
|
|
[Produces(JsonDefaults.CamelCaseMediaType)]
|
|
|
|
|
public async Task<ActionResult<PackageInfo>> GetPackageInfo(
|
|
|
|
|
[FromRoute, Required] string name,
|
|
|
|
|
[FromQuery] Guid? assemblyGuid)
|
|
|
|
@ -72,6 +71,7 @@ namespace Jellyfin.Api.Controllers
|
|
|
|
|
/// <returns>An <see cref="PackageInfo"/> containing available packages information.</returns>
|
|
|
|
|
[HttpGet("Packages")]
|
|
|
|
|
[ProducesResponseType(StatusCodes.Status200OK)]
|
|
|
|
|
[Produces(JsonDefaults.CamelCaseMediaType)]
|
|
|
|
|
public async Task<IEnumerable<PackageInfo>> GetPackages()
|
|
|
|
|
{
|
|
|
|
|
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>
|
|
|
|
|
[HttpGet("Repositories")]
|
|
|
|
|
[ProducesResponseType(StatusCodes.Status200OK)]
|
|
|
|
|
[Produces(JsonDefaults.CamelCaseMediaType)]
|
|
|
|
|
public ActionResult<IEnumerable<RepositoryInfo>> GetRepositories()
|
|
|
|
|
{
|
|
|
|
|
return _serverConfigurationManager.Configuration.PluginRepositories;
|
|
|
|
|