Added a way to force rescan artist infos

This commit is contained in:
emeric
2025-05-18 14:21:52 +02:00
parent 13b3aac03c
commit f44e4b9f40
6 changed files with 29 additions and 4 deletions
@@ -127,6 +127,7 @@ namespace lms::scanner
artistInfo.modify()->setAbsoluteFilePath(_file);
}
artistInfo.modify()->setScanVersion(_settings.artistInfoScanVersion);
artistInfo.modify()->setName(_parsedArtistInfo->name);
artistInfo.modify()->setSortName(_parsedArtistInfo->sortName);
artistInfo.modify()->setLastWriteTime(fileInfo->lastWriteTime);
@@ -164,7 +165,7 @@ namespace lms::scanner
core::LiteralString ArtistInfoFileScanner::getName() const
{
return "Artist info scanner ";
return "Artist info scanner";
}
std::span<const std::filesystem::path> ArtistInfoFileScanner::getSupportedExtensions() const
@@ -193,7 +194,9 @@ namespace lms::scanner
db::Session& dbSession{ _db.getTLSSession() };
auto transaction{ dbSession.createReadTransaction() };
db::ArtistInfo::pointer artistInfo{ db::ArtistInfo::find(dbSession, file.file) };
if (artistInfo && artistInfo->getLastWriteTime() == lastWriteTime)
if (artistInfo
&& artistInfo->getLastWriteTime() == lastWriteTime
&& artistInfo->getScanVersion() == _settings.artistInfoScanVersion)
{
context.stats.skips++;
return false;