up
This commit is contained in:
parent
cf900f831e
commit
f3efacb784
@ -87,6 +87,22 @@ namespace Comic_CBZ_Helper
|
|||||||
// 设置初始日期
|
// 设置初始日期
|
||||||
DateTime currentDate = new(2020, 1, 1, 0, 0, 0);
|
DateTime currentDate = new(2020, 1, 1, 0, 0, 0);
|
||||||
int count = 0;
|
int count = 0;
|
||||||
|
int timeInc = 7;
|
||||||
|
|
||||||
|
// 寻找合适的日期增加量
|
||||||
|
DateTime tempDate = currentDate;
|
||||||
|
while (tempDate.AddHours(comicFolders.Count * timeInc) >= DateTime.Now)
|
||||||
|
{
|
||||||
|
timeInc--;
|
||||||
|
if (timeInc == 0)
|
||||||
|
{
|
||||||
|
Console.WriteLine("日期增加量无效,请修改代码");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
tempDate = currentDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// 循环处理每个漫画文件夹
|
// 循环处理每个漫画文件夹
|
||||||
foreach (var comicFolder in comicFolders)
|
foreach (var comicFolder in comicFolders)
|
||||||
{
|
{
|
||||||
@ -106,7 +122,7 @@ namespace Comic_CBZ_Helper
|
|||||||
Console.WriteLine($"CBZ 文件 {cbzFileName} 已存在,跳过。");
|
Console.WriteLine($"CBZ 文件 {cbzFileName} 已存在,跳过。");
|
||||||
count++;
|
count++;
|
||||||
processedFolders++;
|
processedFolders++;
|
||||||
currentDate = currentDate.AddHours(7);
|
currentDate = currentDate.AddHours(timeInc);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -167,7 +183,7 @@ namespace Comic_CBZ_Helper
|
|||||||
Directory.Delete(tempFolder, true);
|
Directory.Delete(tempFolder, true);
|
||||||
|
|
||||||
// 增加日期
|
// 增加日期
|
||||||
currentDate = currentDate.AddHours(7);
|
currentDate = currentDate.AddHours(timeInc);
|
||||||
count++;
|
count++;
|
||||||
processedFolders++;
|
processedFolders++;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user