Some code cleanup. Allow NextUpDateCutoff to be null
This commit is contained in:
parent
d7855500c2
commit
198cc6e76a
|
@ -156,7 +156,7 @@ namespace Emby.Server.Implementations.TV
|
||||||
return i.Item1 != DateTime.MinValue;
|
return i.Item1 != DateTime.MinValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (alwaysEnableFirstEpisode || (i.Item1 != DateTime.MinValue && i.Item1.Date > request.NextUpDateCutoff))
|
if (alwaysEnableFirstEpisode || (i.Item1 != DateTime.MinValue && (request.NextUpDateCutoff is null || i.Item1.Date > request.NextUpDateCutoff)))
|
||||||
{
|
{
|
||||||
anyFound = true;
|
anyFound = true;
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -82,7 +82,7 @@ namespace Jellyfin.Api.Controllers
|
||||||
[FromQuery] int? imageTypeLimit,
|
[FromQuery] int? imageTypeLimit,
|
||||||
[FromQuery, ModelBinder(typeof(CommaDelimitedArrayModelBinder))] ImageType[] enableImageTypes,
|
[FromQuery, ModelBinder(typeof(CommaDelimitedArrayModelBinder))] ImageType[] enableImageTypes,
|
||||||
[FromQuery] bool? enableUserData,
|
[FromQuery] bool? enableUserData,
|
||||||
[FromQuery] DateTime nextUpDateCutoff,
|
[FromQuery] DateTime? nextUpDateCutoff,
|
||||||
[FromQuery] bool enableTotalRecordCount = true,
|
[FromQuery] bool enableTotalRecordCount = true,
|
||||||
[FromQuery] bool disableFirstEpisode = false)
|
[FromQuery] bool disableFirstEpisode = false)
|
||||||
{
|
{
|
||||||
|
|
|
@ -13,7 +13,7 @@ namespace MediaBrowser.Model.Querying
|
||||||
EnableImageTypes = Array.Empty<ImageType>();
|
EnableImageTypes = Array.Empty<ImageType>();
|
||||||
EnableTotalRecordCount = true;
|
EnableTotalRecordCount = true;
|
||||||
DisableFirstEpisode = false;
|
DisableFirstEpisode = false;
|
||||||
NextUpDateCutoff = new DateTime(0001, 01, 01);
|
NextUpDateCutoff = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -80,6 +80,6 @@ namespace MediaBrowser.Model.Querying
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets a value indicating the oldest date for a show to appear in Next Up.
|
/// Gets or sets a value indicating the oldest date for a show to appear in Next Up.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public DateTime NextUpDateCutoff { get; set; }
|
public DateTime? NextUpDateCutoff { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user