Skip to content

Commit

Permalink
Merge pull request #4847 from uklotzde/track-metadata-update
Browse files Browse the repository at this point in the history
lp1981106: Remove wrong debug assertion about source synchronization time stamps
  • Loading branch information
daschuer authored Jul 9, 2022
2 parents b58dd5b + 5d632bb commit 21fedf4
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 12 deletions.
17 changes: 7 additions & 10 deletions src/track/trackrecord.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -166,21 +166,18 @@ TrackRecord::SourceSyncStatus TrackRecord::checkSourceSyncStatus(
if (getSourceSynchronizedAt() < fileSourceSynchronizedAt) {
return SourceSyncStatus::Outdated;
}
// This could actually happen when users replace files with
// an older version on the file system. But it should never
// happen under normal operation. Otherwise it might indicate
// a serious programming error and we should detect it early
// before the release. Debug assertions are only enabled in
// development and testing versions.
VERIFY_OR_DEBUG_ASSERT(getSourceSynchronizedAt() <= fileSourceSynchronizedAt) {
kLogger.warning()
if (getSourceSynchronizedAt() > fileSourceSynchronizedAt) {
// The internal metadata has either been updated and not re-exported (yet)
// or the file has been replaced with an older version. In both cases the
// file metadata should not be re-imported implicitly and is considered
// as synchronized.
kLogger.debug()
<< "Internal source synchronization time stamp"
<< getSourceSynchronizedAt()
<< "is ahead of"
<< fileSourceSynchronizedAt
<< "for file"
<< mixxx::FileInfo(fileInfo)
<< ": Has this file been replaced with an older version?";
<< mixxx::FileInfo(fileInfo);
}
return SourceSyncStatus::Synchronized;
}
Expand Down
6 changes: 4 additions & 2 deletions src/track/trackrecord.h
Original file line number Diff line number Diff line change
Expand Up @@ -120,10 +120,12 @@ class TrackRecord final {
/// that allow to monitor the modification time of the file.
Unknown,

/// The metadata in Mixxx is up-to-date.
/// The metadata in Mixxx is up-to-date, i.e. not older than the
/// last modification time stamp of the underlying file.
Synchronized,

/// The metadata in Mixxx is older than the metadata stored in file tags.
/// The metadata in Mixxx is older than the metadata stored in file tags
/// and should be re-imported.
Outdated,

/// The status could not be determined for whatever reason,
Expand Down

0 comments on commit 21fedf4

Please sign in to comment.