From 0af72dc649862f27e0e7eee766632050e42a4a06 Mon Sep 17 00:00:00 2001 From: Mikal Stordal Date: Sun, 1 Dec 2024 20:00:21 +0100 Subject: [PATCH] fix: convert episode images from a list to the images DTO model --- Shoko.Server/API/v3/Controllers/TmdbController.cs | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/Shoko.Server/API/v3/Controllers/TmdbController.cs b/Shoko.Server/API/v3/Controllers/TmdbController.cs index 47395825d..d7d1446a8 100644 --- a/Shoko.Server/API/v3/Controllers/TmdbController.cs +++ b/Shoko.Server/API/v3/Controllers/TmdbController.cs @@ -2120,7 +2120,7 @@ public ActionResult> GetOverviewsForTmdbEpisodeByEpisode } [HttpGet("Episode/{episodeID}/Images")] - public ActionResult> GetImagesForTmdbEpisodeByEpisodeID( + public ActionResult GetImagesForTmdbEpisodeByEpisodeID( [FromRoute] int episodeID, [FromQuery, ModelBinder(typeof(CommaDelimitedModelBinder))] HashSet? language = null ) @@ -2129,10 +2129,7 @@ public ActionResult> GetImagesForTmdbEpisodeByEpisodeID( if (episode is null) return NotFound(EpisodeNotFound); - return episode.GetImages() - .InLanguage(language) - .Select(image => new Image(image)) - .ToList(); + return episode.GetImages().ToDto(language, includeThumbnails: true); } [HttpGet("Episode/{episodeID}/Cast")]