mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-12-18 06:53:07 +03:00
Add query parameter to disable returning first episode as next up
This commit is contained in:
@@ -67,6 +67,7 @@ namespace Jellyfin.Api.Controllers
|
||||
/// <param name="enableImageTypes">Optional. The image types to include in the output.</param>
|
||||
/// <param name="enableUserData">Optional. Include user data.</param>
|
||||
/// <param name="enableTotalRecordCount">Whether to enable the total records count. Defaults to true.</param>
|
||||
/// <param name="disableFirstEpisode">Whether to disable sending the first episode in a series as next up.</param>
|
||||
/// <returns>A <see cref="QueryResult{BaseItemDto}"/> with the next up episodes.</returns>
|
||||
[HttpGet("NextUp")]
|
||||
[ProducesResponseType(StatusCodes.Status200OK)]
|
||||
@@ -81,7 +82,8 @@ namespace Jellyfin.Api.Controllers
|
||||
[FromQuery] int? imageTypeLimit,
|
||||
[FromQuery, ModelBinder(typeof(CommaDelimitedArrayModelBinder))] ImageType[] enableImageTypes,
|
||||
[FromQuery] bool? enableUserData,
|
||||
[FromQuery] bool enableTotalRecordCount = true)
|
||||
[FromQuery] bool enableTotalRecordCount = true,
|
||||
[FromQuery] bool disableFirstEpisode = false)
|
||||
{
|
||||
var options = new DtoOptions { Fields = fields }
|
||||
.AddClientFields(Request)
|
||||
@@ -95,7 +97,8 @@ namespace Jellyfin.Api.Controllers
|
||||
SeriesId = seriesId,
|
||||
StartIndex = startIndex,
|
||||
UserId = userId ?? Guid.Empty,
|
||||
EnableTotalRecordCount = enableTotalRecordCount
|
||||
EnableTotalRecordCount = enableTotalRecordCount,
|
||||
DisableFirstEpisode = disableFirstEpisode
|
||||
},
|
||||
options);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user