diff --git a/src/track/track.cpp b/src/track/track.cpp index 63eb3f905ba..5ae33fe3867 100644 --- a/src/track/track.cpp +++ b/src/track/track.cpp @@ -217,6 +217,8 @@ void Track::replaceMetadataFromSource( if (colorModified) { emit colorUpdated(newColor); } + + emitMetadataChanged(); } // TODO: Import Serato metadata within the locking scope and not @@ -240,6 +242,7 @@ bool Track::mergeExtraMetadataFromSource( } markDirtyAndUnlock(&lock); // Modified + emitMetadataChanged(); return true; } @@ -314,6 +317,8 @@ bool Track::replaceRecord( if (oldColor != newColor) { emit colorUpdated(newColor); } + + emitMetadataChanged(); return true; } @@ -444,6 +449,26 @@ void Track::emitBeatsAndBpmUpdated( emit bpmTextChanged(); } +void Track::emitMetadataChanged() { + emit artistChanged(getArtist()); + emit titleChanged(getTitle()); + emit albumChanged(getAlbum()); + emit albumArtistChanged(getAlbumArtist()); + emit genreChanged(getGenre()); + emit composerChanged(getComposer()); + emit groupingChanged(getGrouping()); + emit yearChanged(getYear()); + emit trackNumberChanged(getTrackNumber()); + emit trackTotalChanged(getTrackTotal()); + emit commentChanged(getComment()); + emit bpmTextChanged(); + emit timesPlayedChanged(); + emit durationChanged(); + emit infoChanged(); + emit keysUpdated(); + emit bpmUpdated(getBpm()); +} + void Track::setMetadataSynchronized(bool metadataSynchronized) { QMutexLocker lock(&m_qMutex); if (compareAndSet(m_record.ptrMetadataSynchronized(), metadataSynchronized)) { diff --git a/src/track/track.h b/src/track/track.h index 2de591e2cbf..f68b08037d3 100644 --- a/src/track/track.h +++ b/src/track/track.h @@ -429,6 +429,9 @@ class Track : public QObject { void afterBeatsAndBpmUpdated(QMutexLocker* pLock); void emitBeatsAndBpmUpdated(mixxx::Bpm newBpm); + /// Emits a changed signal for each Q_PROPERTY + void emitMetadataChanged(); + /// Sets beats and returns a boolean to indicate if BPM/Beats were updated. /// Only supposed to be called while the caller guards this a lock. bool setBeatsWhileLocked(mixxx::BeatsPointer pBeats);