Skip to content

Commit

Permalink
suggestions from review
Browse files Browse the repository at this point in the history
  • Loading branch information
crobibero committed Jul 25, 2024
1 parent 6fd79fb commit 4f746c4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions Jellyfin.Api/Controllers/LiveTvController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -677,11 +677,11 @@ public async Task<ActionResult<QueryResult<BaseItemDto>>> GetPrograms([FromBody]
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;
Expand Down
4 changes: 3 additions & 1 deletion Jellyfin.Api/Models/LiveTvDtos/GetProgramsDto.cs
Original file line number Diff line number Diff line change
@@ -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;
Expand Down Expand Up @@ -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>
Expand All @@ -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.
Expand Down

0 comments on commit 4f746c4

Please sign in to comment.