mirror of
https://github.com/C9Glax/tranga.git
synced 2025-04-16 05:13:18 +02:00
Fix file-extension on image download
This commit is contained in:
parent
1785aa28ea
commit
fafcdac00a
@ -213,8 +213,7 @@ public abstract class MangaConnector : GlobalBase
|
|||||||
//Download all Images to temporary Folder
|
//Download all Images to temporary Folder
|
||||||
foreach (string imageUrl in imageUrls)
|
foreach (string imageUrl in imageUrls)
|
||||||
{
|
{
|
||||||
string[] split = imageUrl.Split('.');
|
string extension = imageUrl.Split('.')[^1].Split('?')[0];
|
||||||
string extension = split[^1];
|
|
||||||
Log($"Downloading image {chapter + 1:000}/{imageUrls.Length:000}"); //TODO
|
Log($"Downloading image {chapter + 1:000}/{imageUrls.Length:000}"); //TODO
|
||||||
HttpStatusCode status = DownloadImage(imageUrl, Path.Join(tempFolder, $"{chapter++}.{extension}"), requestType, referrer);
|
HttpStatusCode status = DownloadImage(imageUrl, Path.Join(tempFolder, $"{chapter++}.{extension}"), requestType, referrer);
|
||||||
Log($"{saveArchiveFilePath} {chapter + 1:000}/{imageUrls.Length:000} {status}");
|
Log($"{saveArchiveFilePath} {chapter + 1:000}/{imageUrls.Length:000} {status}");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user