mirror of
https://github.com/C9Glax/tranga-website.git
synced 2025-01-30 16:37:29 +01:00
Added file extension to downloaded Images.
This commit is contained in:
parent
81f380dc3c
commit
ada842957e
@ -20,7 +20,12 @@ public abstract class Connector
|
||||
|
||||
int chapter = 0;
|
||||
foreach (string imageUrl in imageUrls)
|
||||
DownloadImage(imageUrl, Path.Join(tempFolder, $"{chapter++}"));
|
||||
{
|
||||
string[] split = imageUrl.Split('.');
|
||||
string extension = split[split.Length - 1];
|
||||
DownloadImage(imageUrl, Path.Join(tempFolder, $"{chapter++}.{extension}"));
|
||||
|
||||
}
|
||||
|
||||
ZipFile.CreateFromDirectory(tempFolder, $"{outputFolderPath}.cbz");
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user