Fixed bad optional acces, fixes #459

This commit is contained in:
emeric
2024-05-11 11:50:29 +02:00
parent 06b071553c
commit 91812469a9
2 changed files with 4 additions and 2 deletions
@@ -263,11 +263,9 @@ namespace lms::scanner
{
std::unique_lock lock{ _statusMutex };
_curState = State::InProgress;
_nextScheduledScan = {};
}
LMS_LOG(UI, INFO, "New scan started!");
refreshScanSettings();
@@ -396,6 +394,8 @@ namespace lms::scanner
{
{
std::unique_lock lock{ _statusMutex };
_curState = State::InProgress;
_currentScanStepStats = stepStats;
}
+2
View File
@@ -249,6 +249,8 @@ namespace lms::ui
break;
case IScannerService::State::InProgress:
assert(status.currentScanStepStats);
_status->setText(Wt::WString::tr("Lms.Admin.ScannerController.status-in-progress")
.arg(status.currentScanStepStats->stepIndex + 1)
.arg(scanner::ScanProgressStepCount));