merge main into feat/145-block-history (post-#181); regenerate OpenAPI artifacts
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
using System.ComponentModel;
|
||||
using ErsatzTV.Application.LibraryBrowse;
|
||||
using ErsatzTV.Core.Api.LibraryBrowse;
|
||||
using MediatR;
|
||||
@@ -22,12 +23,15 @@ public class LibraryBrowseController(IMediator mediator) : ControllerBase
|
||||
[FromQuery] LibraryBrowseMediaType? mediaType = null,
|
||||
[FromQuery] int pageNum = 0,
|
||||
[FromQuery] int pageSize = 100,
|
||||
[FromQuery]
|
||||
[Description("Parent television show id; only used with mediaType=TelevisionSeason (lists that show's seasons), ignored otherwise")]
|
||||
int? parentId = null,
|
||||
CancellationToken cancellationToken = default)
|
||||
{
|
||||
int clampedPageNum = Math.Max(0, pageNum);
|
||||
int clampedPageSize = Math.Clamp(pageSize, 1, MaxPageSize);
|
||||
return await mediator.Send(
|
||||
new GetLibraryBrowseItems(query, libraryId, mediaType, clampedPageNum, clampedPageSize),
|
||||
new GetLibraryBrowseItems(query, libraryId, mediaType, clampedPageNum, clampedPageSize, parentId),
|
||||
cancellationToken);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4968,6 +4968,15 @@
|
||||
"format": "int32",
|
||||
"default": 100
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "parentId",
|
||||
"in": "query",
|
||||
"description": "Parent television show id; only used with mediaType=TelevisionSeason (lists that show's seasons), ignored otherwise",
|
||||
"schema": {
|
||||
"type": "integer",
|
||||
"format": "int32"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
|
||||
Reference in New Issue
Block a user