From 8f5110b5f407aa6dcb115f8fb9851690ba8f8c05 Mon Sep 17 00:00:00 2001 From: emeric Date: Thu, 7 Nov 2024 13:02:45 +0100 Subject: [PATCH] Fixed bad usages --- src/libs/metadata/impl/TagLibTagReader.cpp | 2 +- src/libs/services/scanner/impl/ScanStepScanFiles.cpp | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/libs/metadata/impl/TagLibTagReader.cpp b/src/libs/metadata/impl/TagLibTagReader.cpp index 47c8de81..c955c802 100644 --- a/src/libs/metadata/impl/TagLibTagReader.cpp +++ b/src/libs/metadata/impl/TagLibTagReader.cpp @@ -57,7 +57,7 @@ namespace lms::metadata }; // Mapping to internal taglib names and/or common alternative custom names - static const std::unordered_map> tagMapping{ + const std::unordered_map> tagMapping{ { TagType::AcoustID, { "ACOUSTID_ID", "ACOUSTID ID" } }, { TagType::Album, { "ALBUM" } }, { TagType::AlbumArtist, { "ALBUMARTIST" } }, diff --git a/src/libs/services/scanner/impl/ScanStepScanFiles.cpp b/src/libs/services/scanner/impl/ScanStepScanFiles.cpp index 90e75144..d9f41898 100644 --- a/src/libs/services/scanner/impl/ScanStepScanFiles.cpp +++ b/src/libs/services/scanner/impl/ScanStepScanFiles.cpp @@ -144,7 +144,7 @@ namespace lms::scanner Artist::pointer artist{ session.create(artistInfo.name) }; if (artistInfo.mbid) - artist.modify()->setMBID(*artistInfo.mbid); + artist.modify()->setMBID(artistInfo.mbid); if (artistInfo.sortName) artist.modify()->setSortName(*artistInfo.sortName); @@ -354,7 +354,7 @@ namespace lms::scanner { std::vector clusters; - auto getOrCreateClusters{ [&](std::string tag, std::span values) { + auto getOrCreateClusters{ [&](std::string_view tag, std::span values) { auto clusterType = ClusterType::find(session, tag); if (!clusterType) clusterType = session.create(tag); @@ -437,7 +437,6 @@ namespace lms::scanner std::vector scanResults; - std::filesystem::path currentDirectory; core::pathUtils::exploreFilesRecursive( mediaLibrary.rootDirectory, [&](std::error_code ec, const std::filesystem::path& path) { LMS_SCOPED_TRACE_DETAILED("Scanner", "OnExploreFile");