A CLI tool for downloading from pixiv.net
Revisão | f93856f4674eb654134bd7e7b55deab01990d662 (tree) |
---|---|
Hora | 2023-04-25 08:19:28 |
Autor | mio <stigma@disr...> |
Commiter | mio |
Change 'daily' behaviour when begin and end equal
@@ -499,9 +499,19 @@ int dailyHandle(string[] args, ref Config config) | ||
499 | 499 | } else { |
500 | 500 | beginDate = Clock.currTime; |
501 | 501 | } |
502 | - stderr.writeln("Begin = ", beginDate); | |
503 | 502 | |
504 | 503 | endDate = SysTime.fromISOExtString(endDateString ~ "T00:00:00"); |
504 | + | |
505 | + /* | |
506 | + * If beginDate and endDate are the same, then we want to download | |
507 | + * all images for that day. | |
508 | + */ | |
509 | + if (endDate.stdTime == beginDate.stdTime) { | |
510 | + beginDate.hour = 23; | |
511 | + beginDate.minute = 59; | |
512 | + beginDate.second = 59; | |
513 | + } | |
514 | + stderr.writeln("Begin = ", beginDate); | |
505 | 515 | stderr.writeln("End = ", endDate); |
506 | 516 | |
507 | 517 | downloadDaily(beginDate, endDate, restrict, config); |