From a668a16035e032e12be0e7e3648f28b9f1f9036f Mon Sep 17 00:00:00 2001 From: glax Date: Mon, 16 Jun 2025 01:14:05 +0200 Subject: [PATCH] Use TrangaSettings.userAgent --- API/MangaDownloadClients/HttpDownloadClient.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/API/MangaDownloadClients/HttpDownloadClient.cs b/API/MangaDownloadClients/HttpDownloadClient.cs index 7c53848..5bf42c4 100644 --- a/API/MangaDownloadClients/HttpDownloadClient.cs +++ b/API/MangaDownloadClients/HttpDownloadClient.cs @@ -1,5 +1,4 @@ using System.Net; -using System.Net.Http.Headers; using HtmlAgilityPack; namespace API.MangaDownloadClients; @@ -15,7 +14,7 @@ internal class HttpDownloadClient : DownloadClient public HttpDownloadClient() { if(Client.DefaultRequestHeaders.UserAgent.Count < 1) - Client.DefaultRequestHeaders.UserAgent.Add(new ("Tranga", "2.0")); + Client.DefaultRequestHeaders.UserAgent.ParseAdd(TrangaSettings.userAgent); } internal override RequestResult MakeRequestInternal(string url, string? referrer = null, string? clickButton = null)