diff options
author | Uwe Klotz <uklotz@mixxx.org> | 2021-05-15 16:19:51 +0200 |
---|---|---|
committer | Uwe Klotz <uklotz@mixxx.org> | 2021-05-17 19:05:39 +0200 |
commit | 0698dbd94ffe121b96daac53441a7bb528ed919d (patch) | |
tree | ad2dc9ef5719b68ecbe23db9af5efdf732b3a319 /src/sources | |
parent | 8051c05afe1662fe0370640b2f67eb176a07f4d9 (diff) |
Rename local variable (more verbose)
Diffstat (limited to 'src/sources')
-rw-r--r-- | src/sources/soundsourceproxy.cpp | 28 |
1 files changed, 16 insertions, 12 deletions
diff --git a/src/sources/soundsourceproxy.cpp b/src/sources/soundsourceproxy.cpp index f94c4f1f44..f39d6ff7f2 100644 --- a/src/sources/soundsourceproxy.cpp +++ b/src/sources/soundsourceproxy.cpp @@ -579,10 +579,12 @@ bool SoundSourceProxy::updateTrackFromSource( } // Parse the tags stored in the audio file - auto metadataImported = - m_pSoundSource->importTrackMetadataAndCoverImage( - &trackMetadata, pCoverImg); - if (metadataImported.first == mixxx::MetadataSource::ImportResult::Failed) { + auto metadataImportedFromSource = + importTrackMetadataAndCoverImage( + &trackMetadata, + pCoverImg); + if (metadataImportedFromSource.first == + mixxx::MetadataSource::ImportResult::Failed) { kLogger.warning() << "Failed to import track metadata" << (pCoverImg ? "and embedded cover art" : "") @@ -596,7 +598,7 @@ bool SoundSourceProxy::updateTrackFromSource( if (mergeExtraMetadataFromSource) { // No reimport of embedded cover image desired in this case DEBUG_ASSERT(!pCoverImg); - if (metadataImported.first == mixxx::MetadataSource::ImportResult::Succeeded) { + if (metadataImportedFromSource.first == mixxx::MetadataSource::ImportResult::Succeeded) { // Partial import of properties that are not (yet) stored // in the database return m_pTrack->mergeExtraMetadataFromSource(trackMetadata); @@ -669,26 +671,28 @@ bool SoundSourceProxy::updateTrackFromSource( if (trackMetadata.refTrackInfo().parseArtistTitleFromFileName( fileInfo.fileName(), splitArtistTitle)) { // Pretend that metadata import succeeded - metadataImported.first = mixxx::MetadataSource::ImportResult::Succeeded; - if (metadataImported.second.isNull()) { + metadataImportedFromSource.first = mixxx::MetadataSource::ImportResult::Succeeded; + if (metadataImportedFromSource.second.isNull()) { // Since this is also some kind of metadata import, we mark the // track's metadata as synchronized with the time stamp of the file. - metadataImported.second = fileInfo.lastModified(); + metadataImportedFromSource.second = fileInfo.lastModified(); } } } // Do not continue with unknown and maybe invalid metadata! - if (metadataImported.first != mixxx::MetadataSource::ImportResult::Succeeded) { + if (metadataImportedFromSource.first != mixxx::MetadataSource::ImportResult::Succeeded) { return false; } m_pTrack->replaceMetadataFromSource( std::move(trackMetadata), - metadataImported.second); + metadataImportedFromSource.second); - bool pendingBeatsImport = m_pTrack->getBeatsImportStatus() == Track::ImportStatus::Pending; - bool pendingCueImport = m_pTrack->getCueImportStatus() == Track::ImportStatus::Pending; + const bool pendingBeatsImport = + m_pTrack->getBeatsImportStatus() == Track::ImportStatus::Pending; + const bool pendingCueImport = + m_pTrack->getCueImportStatus() == Track::ImportStatus::Pending; if (pendingBeatsImport || pendingCueImport) { // Try to open the audio source once to determine the actual // stream properties for finishing the pending import. |