From faab11ca30dc82d06976fa21dbabc618574d542d Mon Sep 17 00:00:00 2001 From: iaom Date: Sat, 20 Apr 2024 16:29:29 +0800 Subject: [PATCH] =?UTF-8?q?fix(file-index):=E8=A7=A3=E5=86=B3ai=E7=B4=A2?= =?UTF-8?q?=E5=BC=95=E5=A2=9E=E5=8A=A0=E7=B4=A2=E5=BC=95=E7=9B=AE=E5=BD=95?= =?UTF-8?q?=E5=A4=B1=E6=95=88=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- libsearch/index/index-scheduler.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/libsearch/index/index-scheduler.cpp b/libsearch/index/index-scheduler.cpp index accfb8f..5e8b483 100644 --- a/libsearch/index/index-scheduler.cpp +++ b/libsearch/index/index-scheduler.cpp @@ -76,7 +76,7 @@ IndexScheduler::IndexScheduler(QObject *parent) : void IndexScheduler::addNewPath(const QString &folders, const QStringList &blackList) { - if(m_indexStop.LOAD && m_contentIndexStop.LOAD && m_ocrContentIndexStop.LOAD) { + if(m_indexStop.LOAD && m_contentIndexStop.LOAD && m_ocrContentIndexStop.LOAD && m_aiIndexStartWaiting) { qDebug() << "Index Scheduler is being stopped, add operation will be executed when started up next time."; return; } @@ -94,6 +94,10 @@ void IndexScheduler::addNewPath(const QString &folders, const QStringList &black target |= BatchIndexer::Target::Ocr; m_statusRecorder->setStatus(OCR_CONTENT_INDEX_DATABASE_STATE_KEY, IndexStatusRecorder::State::Updating); } + if(m_config->isAiIndexEnable()) { + target |= BatchIndexer::Target::Ai; + m_statusRecorder->setStatus(AI_INDEX_DATABASE_STATE_KEY, IndexStatusRecorder::State::Updating); + } BatchIndexer::WorkMode mode = BatchIndexer::WorkMode::Add; startIndexJob(QStringList() << folders, blackList, mode, target); if(BatchIndexer::Target::None != target) {