mirror of
https://github.com/C9Glax/tranga-website.git
synced 2025-01-31 00:47:30 +01:00
renamed variable
This commit is contained in:
parent
ab34ca2c45
commit
cd061d23fc
@ -15,7 +15,7 @@ public abstract class Connector
|
|||||||
public abstract Publication[] GetPublications(string publicationTitle = "");
|
public abstract Publication[] GetPublications(string publicationTitle = "");
|
||||||
public abstract Chapter[] GetChapters(Publication publication, string language = "");
|
public abstract Chapter[] GetChapters(Publication publication, string language = "");
|
||||||
public abstract void DownloadChapter(Publication publication, Chapter chapter); //where to?
|
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)
|
internal void DownloadChapter(string[] imageUrls, string outputFilePath)
|
||||||
{
|
{
|
||||||
|
@ -183,11 +183,11 @@ public class MangaDex : Connector
|
|||||||
DownloadChapter(imageUrls.ToArray(), Path.Join(downloadLocation, publication.folderName, chapter.fileName));
|
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);
|
DownloadClient.RequestResult requestResult = _downloadClient.MakeRequest(url);
|
||||||
byte[] buffer = new byte[requestResult.result.Length];
|
byte[] buffer = new byte[requestResult.result.Length];
|
||||||
requestResult.result.ReadExactly(buffer, 0, buffer.Length);
|
requestResult.result.ReadExactly(buffer, 0, buffer.Length);
|
||||||
File.WriteAllBytes(path, buffer);
|
File.WriteAllBytes(savePath, buffer);
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user