From cc03b6fa9c35196f59fcd2972f16e23bbfc8aa01 Mon Sep 17 00:00:00 2001 From: Glax Date: Thu, 13 Mar 2025 19:58:29 +0100 Subject: [PATCH] Fix referrer and statuscode when fetching covers --- API/Schema/Manga.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/API/Schema/Manga.cs b/API/Schema/Manga.cs index 990b192..f1669fa 100644 --- a/API/Schema/Manga.cs +++ b/API/Schema/Manga.cs @@ -150,8 +150,8 @@ public class Manga if (File.Exists(saveImagePath)) return saveImagePath; - RequestResult coverResult = new HttpDownloadClient().MakeRequest(CoverUrl, RequestType.MangaCover, this.WebsiteUrl); - if (coverResult.statusCode is < HttpStatusCode.Accepted or >= HttpStatusCode.Ambiguous) + RequestResult coverResult = new HttpDownloadClient().MakeRequest(CoverUrl, RequestType.MangaCover, $"https://{match.Groups[1].Value}"); + if (coverResult.statusCode is < HttpStatusCode.OK or >= HttpStatusCode.Ambiguous) return SaveCoverImageToCache(--retries); using MemoryStream ms = new();