fix(file-index):解决ai索引增加索引目录失效的问题
This commit is contained in:
parent
bd18f13567
commit
faab11ca30
|
@ -76,7 +76,7 @@ IndexScheduler::IndexScheduler(QObject *parent) :
|
||||||
|
|
||||||
void IndexScheduler::addNewPath(const QString &folders, const QStringList &blackList)
|
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.";
|
qDebug() << "Index Scheduler is being stopped, add operation will be executed when started up next time.";
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -94,6 +94,10 @@ void IndexScheduler::addNewPath(const QString &folders, const QStringList &black
|
||||||
target |= BatchIndexer::Target::Ocr;
|
target |= BatchIndexer::Target::Ocr;
|
||||||
m_statusRecorder->setStatus(OCR_CONTENT_INDEX_DATABASE_STATE_KEY, IndexStatusRecorder::State::Updating);
|
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;
|
BatchIndexer::WorkMode mode = BatchIndexer::WorkMode::Add;
|
||||||
startIndexJob(QStringList() << folders, blackList, mode, target);
|
startIndexJob(QStringList() << folders, blackList, mode, target);
|
||||||
if(BatchIndexer::Target::None != target) {
|
if(BatchIndexer::Target::None != target) {
|
||||||
|
|
Loading…
Reference in New Issue