|
|
|
@ -76,7 +76,7 @@ namespace Jellyfin.Api.Controllers
|
|
|
|
|
[FromQuery] int? limit,
|
|
|
|
|
[FromQuery, ModelBinder(typeof(CommaDelimitedArrayModelBinder))] ItemFields[] fields,
|
|
|
|
|
[FromQuery] string? seriesId,
|
|
|
|
|
[FromQuery] string? parentId,
|
|
|
|
|
[FromQuery] Guid? parentId,
|
|
|
|
|
[FromQuery] bool? enableImges,
|
|
|
|
|
[FromQuery] int? imageTypeLimit,
|
|
|
|
|
[FromQuery, ModelBinder(typeof(CommaDelimitedArrayModelBinder))] ImageType[] enableImageTypes,
|
|
|
|
@ -132,7 +132,7 @@ namespace Jellyfin.Api.Controllers
|
|
|
|
|
[FromQuery] int? startIndex,
|
|
|
|
|
[FromQuery] int? limit,
|
|
|
|
|
[FromQuery, ModelBinder(typeof(CommaDelimitedArrayModelBinder))] ItemFields[] fields,
|
|
|
|
|
[FromQuery] string? parentId,
|
|
|
|
|
[FromQuery] Guid? parentId,
|
|
|
|
|
[FromQuery] bool? enableImges,
|
|
|
|
|
[FromQuery] int? imageTypeLimit,
|
|
|
|
|
[FromQuery, ModelBinder(typeof(CommaDelimitedArrayModelBinder))] ImageType[] enableImageTypes,
|
|
|
|
@ -144,7 +144,7 @@ namespace Jellyfin.Api.Controllers
|
|
|
|
|
|
|
|
|
|
var minPremiereDate = DateTime.Now.Date.ToUniversalTime().AddDays(-1);
|
|
|
|
|
|
|
|
|
|
var parentIdGuid = string.IsNullOrWhiteSpace(parentId) ? Guid.Empty : new Guid(parentId);
|
|
|
|
|
var parentIdGuid = parentId ?? Guid.Empty;
|
|
|
|
|
|
|
|
|
|
var options = new DtoOptions { Fields = fields }
|
|
|
|
|
.AddClientFields(Request)
|
|
|
|
@ -194,14 +194,14 @@ namespace Jellyfin.Api.Controllers
|
|
|
|
|
[ProducesResponseType(StatusCodes.Status200OK)]
|
|
|
|
|
[ProducesResponseType(StatusCodes.Status404NotFound)]
|
|
|
|
|
public ActionResult<QueryResult<BaseItemDto>> GetEpisodes(
|
|
|
|
|
[FromRoute, Required] string seriesId,
|
|
|
|
|
[FromRoute, Required] Guid seriesId,
|
|
|
|
|
[FromQuery] Guid? userId,
|
|
|
|
|
[FromQuery, ModelBinder(typeof(CommaDelimitedArrayModelBinder))] ItemFields[] fields,
|
|
|
|
|
[FromQuery] int? season,
|
|
|
|
|
[FromQuery] string? seasonId,
|
|
|
|
|
[FromQuery] Guid? seasonId,
|
|
|
|
|
[FromQuery] bool? isMissing,
|
|
|
|
|
[FromQuery] string? adjacentTo,
|
|
|
|
|
[FromQuery] string? startItemId,
|
|
|
|
|
[FromQuery] Guid? startItemId,
|
|
|
|
|
[FromQuery] int? startIndex,
|
|
|
|
|
[FromQuery] int? limit,
|
|
|
|
|
[FromQuery] bool? enableImages,
|
|
|
|
@ -220,9 +220,9 @@ namespace Jellyfin.Api.Controllers
|
|
|
|
|
.AddClientFields(Request)
|
|
|
|
|
.AddAdditionalDtoOptions(enableImages, enableUserData, imageTypeLimit, enableImageTypes!);
|
|
|
|
|
|
|
|
|
|
if (!string.IsNullOrWhiteSpace(seasonId)) // Season id was supplied. Get episodes by season id.
|
|
|
|
|
if (seasonId.HasValue) // Season id was supplied. Get episodes by season id.
|
|
|
|
|
{
|
|
|
|
|
var item = _libraryManager.GetItemById(new Guid(seasonId));
|
|
|
|
|
var item = _libraryManager.GetItemById(seasonId.Value);
|
|
|
|
|
if (!(item is Season seasonItem))
|
|
|
|
|
{
|
|
|
|
|
return NotFound("No season exists with Id " + seasonId);
|
|
|
|
@ -264,10 +264,10 @@ namespace Jellyfin.Api.Controllers
|
|
|
|
|
.ToList();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (!string.IsNullOrWhiteSpace(startItemId))
|
|
|
|
|
if (startItemId.HasValue)
|
|
|
|
|
{
|
|
|
|
|
episodes = episodes
|
|
|
|
|
.SkipWhile(i => !string.Equals(i.Id.ToString("N", CultureInfo.InvariantCulture), startItemId, StringComparison.OrdinalIgnoreCase))
|
|
|
|
|
.SkipWhile(i => startItemId.Value.Equals(i.Id))
|
|
|
|
|
.ToList();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -316,7 +316,7 @@ namespace Jellyfin.Api.Controllers
|
|
|
|
|
[ProducesResponseType(StatusCodes.Status200OK)]
|
|
|
|
|
[ProducesResponseType(StatusCodes.Status404NotFound)]
|
|
|
|
|
public ActionResult<QueryResult<BaseItemDto>> GetSeasons(
|
|
|
|
|
[FromRoute, Required] string seriesId,
|
|
|
|
|
[FromRoute, Required] Guid seriesId,
|
|
|
|
|
[FromQuery] Guid? userId,
|
|
|
|
|
[FromQuery, ModelBinder(typeof(CommaDelimitedArrayModelBinder))] ItemFields[] fields,
|
|
|
|
|
[FromQuery] bool? isSpecialSeason,
|
|
|
|
|