Fixed regression on extra tags to parse, fixes #395

This commit is contained in:
emeric
2024-01-06 23:38:54 +01:00
parent b80282a05a
commit fa3638ef46
3 changed files with 14 additions and 2 deletions
+8
View File
@@ -292,6 +292,13 @@ CREATE TABLE IF NOT EXISTS "track_backup" (
session.getDboSession().execute("UPDATE scan_settings SET scan_version = scan_version + 1");
}
void migrateFromV48(Session& session)
{
// Regression for the extra tags not being parsed
// Just increment the scan version of the settings to make the next scheduled scan rescan everything
session.getDboSession().execute("UPDATE scan_settings SET scan_version = scan_version + 1");
}
void doDbMigration(Session& session)
{
static const std::string outdatedMsg{ "Outdated database, please rebuild it (delete the .db file and restart)" };
@@ -318,6 +325,7 @@ CREATE TABLE IF NOT EXISTS "track_backup" (
{45, migrateFromV45},
{46, migrateFromV46},
{47, migrateFromV47},
{48, migrateFromV48},
};
{
+1 -1
View File
@@ -26,7 +26,7 @@ namespace Database
class Session;
using Version = std::size_t;
static constexpr Version LMS_DATABASE_VERSION{ 48 };
static constexpr Version LMS_DATABASE_VERSION{ 49 };
class VersionInfo
{
public:
@@ -224,7 +224,11 @@ namespace Scanner
void ScanStepScanFiles::process(ScanContext& context)
{
_metadataParser->setUserExtraTags(_extraTagsToParse);
{
std::vector<std::string> tagsToParse{ _extraTagsToParse };
tagsToParse.insert(std::end(tagsToParse), std::cbegin(_settings.extraTags), std::cend(_settings.extraTags));
_metadataParser->setUserExtraTags(tagsToParse);
}
context.currentStepStats.totalElems = context.stats.filesScanned;