The Free Software Media System - Server Backend & API
Make userId optional in GetProgramsDto
Niels van Velzenfd957ec7f46f
diff --git a/Jellyfin.Api/Controllers/LiveTvController.cs b/Jellyfin.Api/Controllers/LiveTvController.csindex da68c72c99..90fedecd61 100644--- a/Jellyfin.Api/Controllers/LiveTvController.cs+++ b/Jellyfin.Api/Controllers/LiveTvController.cs@@ -628,7 +628,7 @@ public class LiveTvController : BaseJellyfinApiController[Authorize(Policy = Policies.LiveTvAccess)]public async Task<ActionResult<QueryResult<BaseItemDto>>> GetPrograms([FromBody] GetProgramsDto body){- var user = body.UserId.IsEmpty() ? null : _userManager.GetUserById(body.UserId);+ var user = body.UserId.IsNullOrEmpty() ? null : _userManager.GetUserById(body.UserId.Value);var query = new InternalItemsQuery(user){diff --git a/Jellyfin.Api/Models/LiveTvDtos/GetProgramsDto.cs b/Jellyfin.Api/Models/LiveTvDtos/GetProgramsDto.csindex 6a30de5e6c..8482b1cf1c 100644--- a/Jellyfin.Api/Models/LiveTvDtos/GetProgramsDto.cs+++ b/Jellyfin.Api/Models/LiveTvDtos/GetProgramsDto.cs@@ -22,7 +22,7 @@ public class GetProgramsDto/// <summary>/// Gets or sets optional. Filter by user id./// </summary>- public Guid UserId { get; set; }+ public Guid? UserId { get; set; }/// <summary>/// Gets or sets the minimum premiere start date.