summaryrefslogtreecommitdiffstats
path: root/src/sources/metadatasourcetaglib.cpp
diff options
context:
space:
mode:
authorBe <be@mixxx.org>2018-06-10 10:51:02 -0500
committerBe <be@mixxx.org>2018-06-10 10:51:02 -0500
commit64bd9db6b1d91e2f74b65d5db41a7ff50a608d36 (patch)
tree1867a23f8c353b381bc6384f5a54fcb619a369ca /src/sources/metadatasourcetaglib.cpp
parentf3a1442138ea0a93374bd09dcd73ee2206235671 (diff)
parent4302cd082418adb9045b140a48db125234f71506 (diff)
Merge remote-tracking branch 'upstream/2.1'
Diffstat (limited to 'src/sources/metadatasourcetaglib.cpp')
-rw-r--r--src/sources/metadatasourcetaglib.cpp23
1 files changed, 15 insertions, 8 deletions
diff --git a/src/sources/metadatasourcetaglib.cpp b/src/sources/metadatasourcetaglib.cpp
index f25e1fa7d9..211ed880f4 100644
--- a/src/sources/metadatasourcetaglib.cpp
+++ b/src/sources/metadatasourcetaglib.cpp
@@ -112,10 +112,12 @@ MetadataSourceTagLib::importTrackMetadataAndCoverImage(
<< "with type" << m_fileType;
return afterImport(ImportResult::Unavailable);
}
- kLogger.trace() << "Importing"
- << ((pTrackMetadata && pCoverImage) ? "track metadata and cover art" : (pTrackMetadata ? "track metadata" : "cover art"))
- << "from file" << m_fileName
- << "with type" << m_fileType;
+ if (kLogger.traceEnabled()) {
+ kLogger.trace() << "Importing"
+ << ((pTrackMetadata && pCoverImage) ? "track metadata and cover art" : (pTrackMetadata ? "track metadata" : "cover art"))
+ << "from file" << m_fileName
+ << "with type" << m_fileType;
+ }
// Rationale: If a file contains different types of tags only
// a single type of tag will be read. Tag types are read in a
@@ -326,10 +328,12 @@ MetadataSourceTagLib::importTrackMetadataAndCoverImage(
return afterImport(ImportResult::Failed);
}
- kLogger.debug()
- << "No track metadata or cover art found"
- << "in file" << m_fileName
- << "with type" << m_fileType;
+ if (kLogger.debugEnabled()) {
+ kLogger.debug()
+ << "No track metadata or cover art found"
+ << "in file" << m_fileName
+ << "with type" << m_fileType;
+ }
return afterImport(ImportResult::Unavailable);
}
@@ -745,6 +749,9 @@ class SafelyWritableFile final {
std::pair<MetadataSource::ExportResult, QDateTime>
MetadataSourceTagLib::exportTrackMetadata(
const TrackMetadata& trackMetadata) const {
+ // NOTE(uklotzde): Log unconditionally (with debug level) to
+ // identify files in the log file that might have caused a
+ // crash while exporting metadata.
kLogger.debug() << "Exporting track metadata"
<< "into file" << m_fileName
<< "with type" << m_fileType;