修复跳过已下载文件后大小计算问题

This commit is contained in:
nilaoda 2023-07-21 16:23:51 +08:00
parent 99f0d66d62
commit 56839edb0c
1 changed files with 2 additions and 0 deletions

View File

@ -88,6 +88,7 @@ namespace N_m3u8DL_RE.Downloader
//已下载跳过
if (File.Exists(des))
{
speedContainer.Add(new FileInfo(des).Length);
return new DownloadResult() { ActualContentLength = 0, ActualFilePath = des };
}
@ -95,6 +96,7 @@ namespace N_m3u8DL_RE.Downloader
var dec = Path.Combine(Path.GetDirectoryName(des)!, Path.GetFileNameWithoutExtension(des) + "_dec" + Path.GetExtension(des));
if (File.Exists(dec))
{
speedContainer.Add(new FileInfo(dec).Length);
return new DownloadResult() { ActualContentLength = 0, ActualFilePath = dec };
}