aboutsummaryrefslogtreecommitdiff
path: root/Jellyfin.Api/Controllers/TrailersController.cs
diff options
context:
space:
mode:
authorJason Dove <jason@jasondove.me>2022-06-18 13:10:50 -0500
committerJason Dove <jason@jasondove.me>2022-06-18 13:10:50 -0500
commite4088ba0bd1b10bca981a7e36e89fb2827e5dbe1 (patch)
tree59a29a27218d610dda3ae48a74d285ea9093a6bd /Jellyfin.Api/Controllers/TrailersController.cs
parent8af9b84745eba04264a027b66acb1c263cc0cf4c (diff)
don't require a user id for items api call using api key
Diffstat (limited to 'Jellyfin.Api/Controllers/TrailersController.cs')
-rw-r--r--Jellyfin.Api/Controllers/TrailersController.cs7
1 files changed, 4 insertions, 3 deletions
diff --git a/Jellyfin.Api/Controllers/TrailersController.cs b/Jellyfin.Api/Controllers/TrailersController.cs
index 790d6e64d..78a493d22 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">Optional user id.</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,