From 63a2a3d2579a3bd2c74a8c302207e3073415e7c2 Mon Sep 17 00:00:00 2001 From: Christiaan Bloemendaal Date: Tue, 2 Jan 2024 09:44:32 +0100 Subject: [PATCH] fix(backend): return appropriate title when getting manga details --- .../Endpoints/Manga/Details/MangaDetailsEndpoint.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Mangarr.Backend/Endpoints/Manga/Details/MangaDetailsEndpoint.cs b/src/Mangarr.Backend/Endpoints/Manga/Details/MangaDetailsEndpoint.cs index 3f2c8ec..ee18678 100644 --- a/src/Mangarr.Backend/Endpoints/Manga/Details/MangaDetailsEndpoint.cs +++ b/src/Mangarr.Backend/Endpoints/Manga/Details/MangaDetailsEndpoint.cs @@ -72,11 +72,15 @@ public override async Task HandleAsync(MangaDetailsRequest req, CancellationToke SourceBase.DeconstructId(document.MangaId, out string url, out _); + string title = !string.IsNullOrEmpty(result.Value.Title.English) + ? result.Value.Title.English + : result.Value.Title.Romaji; + await SendOkAsync(new MangaDetailsResponse { Data = new MangaDetailsModel { - Title = result.Value.Title.English, + Title = title, SourceName = source.Name, SourceUrl = url, Description = result.Value.DescriptionHtml,