Add REST endpoints backing the SPA media detail pages and image browser:
- GET /api/movies/{id}, /api/shows/{id}, /api/seasons/{id}, /api/artists/{id}
wrapping the existing detail queries; 404 on None.
- GET /api/media-items/{id}/info wrapping GetMediaItemInfo; UnableToLocateMediaItem
-> 404, other errors -> 422.
- GET /api/images/folders?parentId= and PUT /api/images/folders/{id}/duration
(validates null-or-positive -> 400; existence guard via new ImageFolderExists
query -> 404).
- Extend GetLibraryBrowseItems parentId drill-in to Episode (episodes of a season,
episode-number order) and MusicVideo (an artist's music videos, album/track order),
alongside the existing TelevisionSeason branch.
Response DTOs live in ErsatzTV.Core/Api/* and never expose Application VMs. Artwork
values are rooted for the SPA via a shared ErsatzTV.Core/Api/ApiArtwork helper
(mirrors the #180/#181 browse-handler logic; handles jellyfin/emby proxy prefixes,
http passthrough, empty). Regenerated OpenAPI v1.json + web v1.d.ts. New controllers
registered in ApiControllerSecurityTests.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
25 lines
552 B
C#
25 lines
552 B
C#
#nullable enable
|
|
using ErsatzTV.Core.Api.Media;
|
|
using ErsatzTV.Core.Domain;
|
|
|
|
namespace ErsatzTV.Core.Api.Movies;
|
|
|
|
public record MovieDetailResponseModel(
|
|
int Id,
|
|
string Title,
|
|
string? Year,
|
|
string? Plot,
|
|
List<string> Genres,
|
|
List<string> Tags,
|
|
List<string> Studios,
|
|
List<string> ContentRatings,
|
|
List<string> Languages,
|
|
List<ActorResponseModel> Actors,
|
|
List<string> Directors,
|
|
List<string> Writers,
|
|
string? Path,
|
|
string? LocalPath,
|
|
MediaItemState State,
|
|
string Poster,
|
|
string FanArt);
|