From 3f692eb3f86a8c9d664c73f2163e526ea7c9b515 Mon Sep 17 00:00:00 2001 From: jessevz Date: Wed, 8 Jul 2026 17:47:13 +0200 Subject: [PATCH] Also make task status finished when hashlist has been cracked --- src/inc/apiv2/model/TaskWrapperDisplayAPI.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/inc/apiv2/model/TaskWrapperDisplayAPI.php b/src/inc/apiv2/model/TaskWrapperDisplayAPI.php index 06d98567e..f90fe2929 100644 --- a/src/inc/apiv2/model/TaskWrapperDisplayAPI.php +++ b/src/inc/apiv2/model/TaskWrapperDisplayAPI.php @@ -119,6 +119,10 @@ protected function getAggregateSearched(object $object): ?string { protected function getAggregateStatus(object $object): int { // TODO: this could be optimized by only requesting taskId, keyspace and keyspaceProgress of all tasks of that wrapper (columnFilter) + $hashlist = Factory::getHashlistFactory()->get($object->getHashlistId()); + if ($hashlist->getCracked() === $hashlist->getHashCount()) { + return 3; + } $tasks = TaskUtils::getTasksOfWrapper($object->getId()); $completed = 0; $total = 0;