diff options
author | Jan Holthuis <jan.holthuis@ruhr-uni-bochum.de> | 2020-05-22 11:03:43 +0200 |
---|---|---|
committer | Jan Holthuis <jan.holthuis@ruhr-uni-bochum.de> | 2020-05-22 11:03:43 +0200 |
commit | c9cae4c0a3995c28c56daeaa41364615cda94ad7 (patch) | |
tree | 5969b69d7d498697ee6ebc9150cd82ae68f85b63 /src/track | |
parent | 95c12fa72c19f7db030545b851bf7daa6c8fc0dc (diff) | |
parent | 2091896785e359eec3dc3c42381519ab01397e58 (diff) |
Merge branch '2.3' of github.com:mixxxdj/mixxx
Diffstat (limited to 'src/track')
-rw-r--r-- | src/track/track.cpp | 9 | ||||
-rw-r--r-- | src/track/track.h | 7 |
2 files changed, 14 insertions, 2 deletions
diff --git a/src/track/track.cpp b/src/track/track.cpp index 1547a42985..d05cfb1bf9 100644 --- a/src/track/track.cpp +++ b/src/track/track.cpp @@ -57,6 +57,13 @@ inline mixxx::Bpm getActualBpm( } // anonymous namespace +// Don't change this string without an entry in the CHANGELOG! +// Otherwise 3rd party software that picks up the currently +// playing track from the main window and relies on this +// formatting would stop working. +//static +const QString Track::kArtistTitleSeparator = QStringLiteral(" - "); + Track::Track( TrackFile fileInfo, SecurityTokenPointer pSecurityToken, @@ -369,7 +376,7 @@ QString Track::getInfo() const { } } else { return m_record.getMetadata().getTrackInfo().getArtist() + - QStringLiteral(" - ") + + kArtistTitleSeparator + m_record.getMetadata().getTrackInfo().getTitle(); } } diff --git a/src/track/track.h b/src/track/track.h index 75524ee438..8d4f8e33a5 100644 --- a/src/track/track.h +++ b/src/track/track.h @@ -235,7 +235,12 @@ class Track : public QObject { // Set URL for track void setURL(const QString& url); - /// Formatted string with artist and title. + /// Separator between artist and title string that is + /// used for composing the track info. + static const QString kArtistTitleSeparator; + + /// Formatted string with artist and title, separated by + /// kArtistTitleSeparator. QString getInfo() const; /// The filename if BOTH artist AND title are empty, e.g. for tracks without |