diff options
| author | Claus Vium <cvium@users.noreply.github.com> | 2022-08-21 16:22:46 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-08-21 16:22:46 +0200 |
| commit | 8a0911004d86380d04c3785c3b587c7d1566ca4e (patch) | |
| tree | 04afdf768586a50fba3225dfa6b3ed9e8c966541 /Jellyfin.Api/Controllers/TrailersController.cs | |
| parent | 893ac59668c3b3a117eab9a0582bd30ad82c9dd4 (diff) | |
| parent | c69b2c849ade5bcebed9ab79a020895285f8fdc6 (diff) | |
Merge pull request #7965 from jasongdove/api-key-items-without-user-id
Diffstat (limited to 'Jellyfin.Api/Controllers/TrailersController.cs')
| -rw-r--r-- | Jellyfin.Api/Controllers/TrailersController.cs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/Jellyfin.Api/Controllers/TrailersController.cs b/Jellyfin.Api/Controllers/TrailersController.cs index 1c5aa9b8e..cf812fa23 100644 --- a/Jellyfin.Api/Controllers/TrailersController.cs +++ b/Jellyfin.Api/Controllers/TrailersController.cs @@ -1,4 +1,5 @@ using System; +using System.Threading.Tasks; using Jellyfin.Api.Constants; using Jellyfin.Api.ModelBinders; using Jellyfin.Data.Enums; @@ -31,7 +32,7 @@ namespace Jellyfin.Api.Controllers /// <summary> /// Finds movies and trailers similar to a given trailer. /// </summary> - /// <param name="userId">The user id.</param> + /// <param name="userId">The user id supplied as query parameter; this is required when not using an API key.</param> /// <param name="maxOfficialRating">Optional filter by maximum official rating (PG, PG-13, TV-MA, etc).</param> /// <param name="hasThemeSong">Optional filter by items with theme songs.</param> /// <param name="hasThemeVideo">Optional filter by items with theme videos.</param> @@ -118,8 +119,8 @@ namespace Jellyfin.Api.Controllers /// <returns>A <see cref="QueryResult{BaseItemDto}"/> with the trailers.</returns> [HttpGet] [ProducesResponseType(StatusCodes.Status200OK)] - public ActionResult<QueryResult<BaseItemDto>> GetTrailers( - [FromQuery] Guid userId, + public Task<ActionResult<QueryResult<BaseItemDto>>> GetTrailers( + [FromQuery] Guid? userId, [FromQuery] string? maxOfficialRating, [FromQuery] bool? hasThemeSong, [FromQuery] bool? hasThemeVideo, |
