fix(file-index):解决ai索引增加索引目录失效的问题

This commit is contained in:
iaom 2024-04-20 16:29:29 +08:00
parent e14266b07c
commit 9293486485
1 changed files with 5 additions and 1 deletions

View File

@ -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) {