diff options
author | Uwe Klotz <uklotz@mixxx.org> | 2021-05-17 19:07:02 +0200 |
---|---|---|
committer | Uwe Klotz <uklotz@mixxx.org> | 2021-05-17 19:07:02 +0200 |
commit | bd4c757d4f694fffcb4e2a5ea46d443b112bad2d (patch) | |
tree | 46194ad3e29a0b9d9ac33a551b99a4b0fb6b9dd1 /src/sources | |
parent | 0698dbd94ffe121b96daac53441a7bb528ed919d (diff) |
Reorder scattered code at one place
Diffstat (limited to 'src/sources')
-rw-r--r-- | src/sources/soundsourceproxy.cpp | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/src/sources/soundsourceproxy.cpp b/src/sources/soundsourceproxy.cpp index f39d6ff7f2..69d94ea198 100644 --- a/src/sources/soundsourceproxy.cpp +++ b/src/sources/soundsourceproxy.cpp @@ -542,15 +542,6 @@ bool SoundSourceProxy::updateTrackFromSource( bool metadataSynchronized = false; mixxx::TrackMetadata trackMetadata = m_pTrack->getMetadata(&metadataSynchronized); - // If the file tags have already been parsed at least once, the - // existing track metadata should not be updated implicitly, i.e. - // if the user did not explicitly choose to (re-)import metadata - // explicitly from this file. - bool mergeExtraMetadataFromSource = false; - if (metadataSynchronized && mode == UpdateTrackFromSourceMode::Once) { - // No (re-)import needed or desired, only merge missing properties - mergeExtraMetadataFromSource = true; - } // Save for later to replace the unreliable and imprecise audio // properties imported from file tags (see below). @@ -562,7 +553,17 @@ bool SoundSourceProxy::updateTrackFromSource( QImage coverImg; DEBUG_ASSERT(coverImg.isNull()); QImage* pCoverImg = nullptr; // pointer also serves as a flag - if (!mergeExtraMetadataFromSource) { + + // If the file tags have already been parsed at least once, the + // existing track metadata should not be updated implicitly, i.e. + // if the user did not explicitly choose to (re-)import metadata + // explicitly from this file. + bool mergeExtraMetadataFromSource = false; + if (metadataSynchronized && mode == UpdateTrackFromSourceMode::Once) { + // No (re-)import needed or desired, only merge missing properties + mergeExtraMetadataFromSource = true; + } else { + // Import the cover initially or when a reimport has been requested const auto coverInfo = m_pTrack->getCoverInfo(); if (coverInfo.source == CoverInfo::USER_SELECTED && coverInfo.type == CoverInfo::FILE) { |