diff options
| author | Cody Robibero <cody@robibe.ro> | 2024-07-25 11:18:25 -0600 |
|---|---|---|
| committer | Cody Robibero <cody@robibe.ro> | 2024-07-25 11:18:25 -0600 |
| commit | 4f746c40d7ffd0d4be46531a057bf6daed121bd8 (patch) | |
| tree | 12b534fc5f8607e62689675d31ba49caae9df1c2 | |
| parent | 6fd79fb01597b5132ca5b3bd9c06c92d527ee0cc (diff) | |
suggestions from review
| -rw-r--r-- | Jellyfin.Api/Controllers/LiveTvController.cs | 4 | ||||
| -rw-r--r-- | Jellyfin.Api/Models/LiveTvDtos/GetProgramsDto.cs | 4 |
2 files changed, 5 insertions, 3 deletions
diff --git a/Jellyfin.Api/Controllers/LiveTvController.cs b/Jellyfin.Api/Controllers/LiveTvController.cs index a15ff0f52..0cf36f57e 100644 --- a/Jellyfin.Api/Controllers/LiveTvController.cs +++ b/Jellyfin.Api/Controllers/LiveTvController.cs @@ -677,11 +677,11 @@ public class LiveTvController : BaseJellyfinApiController GenreIds = body.GenreIds ?? [] }; - if (!body.LibrarySeriesId.IsEmpty()) + if (!body.LibrarySeriesId.IsNullOrEmpty()) { query.IsSeries = true; - var series = _libraryManager.GetItemById<Series>(body.LibrarySeriesId); + var series = _libraryManager.GetItemById<Series>(body.LibrarySeriesId.Value); if (series is not null) { query.Name = series.Name; diff --git a/Jellyfin.Api/Models/LiveTvDtos/GetProgramsDto.cs b/Jellyfin.Api/Models/LiveTvDtos/GetProgramsDto.cs index 633729c11..7210cc8f7 100644 --- a/Jellyfin.Api/Models/LiveTvDtos/GetProgramsDto.cs +++ b/Jellyfin.Api/Models/LiveTvDtos/GetProgramsDto.cs @@ -1,5 +1,6 @@ using System; using System.Collections.Generic; +using System.ComponentModel; using System.Text.Json.Serialization; using Jellyfin.Data.Enums; using Jellyfin.Extensions.Json.Converters; @@ -121,6 +122,7 @@ public class GetProgramsDto /// <summary> /// Gets or sets a value indicating whether retrieve total record count. /// </summary> + [DefaultValue(true)] public bool EnableTotalRecordCount { get; set; } = true; /// <summary> @@ -147,7 +149,7 @@ public class GetProgramsDto /// <summary> /// Gets or sets filter by library series id. /// </summary> - public Guid LibrarySeriesId { get; set; } + public Guid? LibrarySeriesId { get; set; } /// <summary> /// Gets or sets specify additional fields of information to return in the output. |
