From cd061d23fcd5eb48ea492ec9ebd4bcc618c38b66 Mon Sep 17 00:00:00 2001 From: glax <--local> Date: Thu, 18 May 2023 19:55:07 +0200 Subject: [PATCH] renamed variable --- Tranga/Connector.cs | 2 +- Tranga/Connectors/MangaDex.cs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Tranga/Connector.cs b/Tranga/Connector.cs index c4d7fc1..26c4dbb 100644 --- a/Tranga/Connector.cs +++ b/Tranga/Connector.cs @@ -15,7 +15,7 @@ public abstract class Connector public abstract Publication[] GetPublications(string publicationTitle = ""); public abstract Chapter[] GetChapters(Publication publication, string language = ""); public abstract void DownloadChapter(Publication publication, Chapter chapter); //where to? - protected abstract void DownloadImage(string url, string path); + protected abstract void DownloadImage(string url, string savePath); internal void DownloadChapter(string[] imageUrls, string outputFilePath) { diff --git a/Tranga/Connectors/MangaDex.cs b/Tranga/Connectors/MangaDex.cs index 625f34b..6dd6aa7 100644 --- a/Tranga/Connectors/MangaDex.cs +++ b/Tranga/Connectors/MangaDex.cs @@ -183,11 +183,11 @@ public class MangaDex : Connector DownloadChapter(imageUrls.ToArray(), Path.Join(downloadLocation, publication.folderName, chapter.fileName)); } - protected override void DownloadImage(string url, string path) + protected override void DownloadImage(string url, string savePath) { DownloadClient.RequestResult requestResult = _downloadClient.MakeRequest(url); byte[] buffer = new byte[requestResult.result.Length]; requestResult.result.ReadExactly(buffer, 0, buffer.Length); - File.WriteAllBytes(path, buffer); + File.WriteAllBytes(savePath, buffer); } } \ No newline at end of file