Fixed bad stats

This commit is contained in:
emeric
2025-03-23 15:46:10 +01:00
parent 97f583cd9c
commit 2bc6723ed9
@@ -191,10 +191,13 @@ namespace lms::scanner
db::Session& dbSession{ _db.getTLSSession() }; db::Session& dbSession{ _db.getTLSSession() };
auto transaction{ dbSession.createReadTransaction() }; auto transaction{ dbSession.createReadTransaction() };
db::ArtistInfo::pointer artistInfo{ db::ArtistInfo::find(dbSession, file.file) }; db::ArtistInfo::pointer artistInfo{ db::ArtistInfo::find(dbSession, file.file) };
if (!artistInfo) if (artistInfo && artistInfo->getLastWriteTime() == lastWriteTime)
return true; {
context.stats.skips++;
return false;
}
return artistInfo->getLastWriteTime() != lastWriteTime; return true;
} }
std::unique_ptr<IFileScanOperation> ArtistInfoFileScanner::createScanOperation(const FileToScan& fileToScan) const std::unique_ptr<IFileScanOperation> ArtistInfoFileScanner::createScanOperation(const FileToScan& fileToScan) const