2
0

renamed variable

This commit is contained in:
glax 2023-05-18 19:55:07 +02:00
parent ab34ca2c45
commit cd061d23fc
2 changed files with 3 additions and 3 deletions

View File

@ -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)
{

View File

@ -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);
}
}