/* */ #include "SeedCheckCommand.h" bool SeedCheckCommand::execute() { if(e->torrentMan->isHalt()) { return true; } if(!seedCriteria.get()) { return false; } if(checkPoint.elapsed(1)) { if(!checkStarted) { if(e->torrentMan->downloadComplete()) { checkStarted = true; seedCriteria->reset(); } } if(checkStarted) { if(seedCriteria->evaluate()) { logger->notice("CUID#%d - Seeding is over.", cuid); e->torrentMan->setHalt(true); } } } e->commands.push_back(this); return false; }