mirror of
https://github.com/C9Glax/tranga.git
synced 2025-04-15 12:53:17 +02:00
DownloadSingleChapter narrow down FileStream options
This commit is contained in:
parent
d314559361
commit
894f105786
@ -78,7 +78,6 @@ public class DownloadSingleChapterJob(string chapterId, string? parentJobId = nu
|
|||||||
{
|
{
|
||||||
if (!TrangaSettings.bwImages && TrangaSettings.compression == 100)
|
if (!TrangaSettings.bwImages && TrangaSettings.compression == 100)
|
||||||
return;
|
return;
|
||||||
DateTime start = DateTime.UtcNow;
|
|
||||||
using Image image = Image.Load(imagePath);
|
using Image image = Image.Load(imagePath);
|
||||||
File.Delete(imagePath);
|
File.Delete(imagePath);
|
||||||
if(TrangaSettings.bwImages)
|
if(TrangaSettings.bwImages)
|
||||||
@ -127,7 +126,7 @@ public class DownloadSingleChapterJob(string chapterId, string? parentJobId = nu
|
|||||||
if (requestResult.result == Stream.Null)
|
if (requestResult.result == Stream.Null)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
FileStream fs = new (savePath, FileMode.Create);
|
FileStream fs = new (savePath, FileMode.Create, FileAccess.Write, FileShare.None);
|
||||||
requestResult.result.CopyTo(fs);
|
requestResult.result.CopyTo(fs);
|
||||||
fs.Close();
|
fs.Close();
|
||||||
ProcessImage(savePath);
|
ProcessImage(savePath);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user