From 764bee04058b9165f492bf69d7233e113303a2b4 Mon Sep 17 00:00:00 2001 From: baliasnyifeliks Date: Sun, 1 Feb 2026 18:17:04 +0200 Subject: [PATCH] refactor(animeon, mikai): consolidate template output --- AnimeON/Controller.cs | 5 +++-- Mikai/Controller.cs | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/AnimeON/Controller.cs b/AnimeON/Controller.cs index 153915b..6715fa1 100644 --- a/AnimeON/Controller.cs +++ b/AnimeON/Controller.cs @@ -168,10 +168,11 @@ namespace AnimeON.Controllers // Повертаємо озвучки + епізоди разом OnLog($"AnimeON: return episodes count={selectedVoiceInfo.Episodes.Count} for voice='{t}' season={selectedAnime.Season}"); + episode_tpl.Append(voice_tpl); if (rjson) - return Content(episode_tpl.ToJson(voice_tpl), "application/json; charset=utf-8"); + return Content(episode_tpl.ToJson(), "application/json; charset=utf-8"); - return Content(voice_tpl.ToHtml() + episode_tpl.ToHtml(), "text/html; charset=utf-8"); + return Content(episode_tpl.ToHtml(), "text/html; charset=utf-8"); } } else // Фільм diff --git a/Mikai/Controller.cs b/Mikai/Controller.cs index c664336..51cc11c 100644 --- a/Mikai/Controller.cs +++ b/Mikai/Controller.cs @@ -121,10 +121,11 @@ namespace Mikai.Controllers } } + episodeTpl.Append(voiceTpl); if (rjson) - return Content(episodeTpl.ToJson(voiceTpl), "application/json; charset=utf-8"); + return Content(episodeTpl.ToJson(), "application/json; charset=utf-8"); - return Content(voiceTpl.ToHtml() + episodeTpl.ToHtml(), "text/html; charset=utf-8"); + return Content(episodeTpl.ToHtml(), "text/html; charset=utf-8"); } var movieTpl = new MovieTpl(displayTitle, original_title);