diff options
author | Uwe Klotz <uklotz@mixxx.org> | 2020-03-08 10:02:36 +0100 |
---|---|---|
committer | Uwe Klotz <uklotz@mixxx.org> | 2020-03-08 10:02:36 +0100 |
commit | 9ea985dd613b4b34679888820f7367dd258f5447 (patch) | |
tree | 537883f265ed55a15c8ec5fa157f7f4cf106a28a | |
parent | a48ff124169c32359c2784a94963893752009828 (diff) | |
parent | f9855a6b4a7a438469e4bfe95d84f3b2db68e197 (diff) |
Merge branch '2.2' of git@github.com:mixxxdj/mixxx.git
# Conflicts:
# CHANGELOG
# src/dialog/dlgabout.cpp
-rw-r--r-- | CHANGELOG.md | 1 | ||||
-rw-r--r-- | src/dialog/dlgabout.cpp | 15 | ||||
-rw-r--r-- | src/library/autodj/autodjprocessor.cpp | 20 | ||||
-rw-r--r-- | src/library/autodj/autodjprocessor.h | 2 |
4 files changed, 27 insertions, 11 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index 24e77e5ae7..f00bc0b72d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,6 +20,7 @@ * Prevent infinite loop when decoding corrupt MP3 files #2417 * Add controller mapping for Native Instruments Traktor Kontrol S2 MK3 #2348 * Add controller mapping for Soundless joyMIDI #2425 +* AutoDJ skip next track when both deck are playing lp:1399974 #2531 ## [2.2.3](https://launchpad.net/mixxx/+milestone/2.2.3) (2019-11-24) diff --git a/src/dialog/dlgabout.cpp b/src/dialog/dlgabout.cpp index 3fa55e513e..ec1a7bb851 100644 --- a/src/dialog/dlgabout.cpp +++ b/src/dialog/dlgabout.cpp @@ -48,11 +48,13 @@ DlgAbout::DlgAbout(QWidget* parent) : QDialog(parent), Ui::DlgAboutDlg() { << "Nicu Badescu" << "Uwe Klotz" << "Be" - << "Sébastien Blaisot"; + << "Sébastien Blaisot" + << "ronso0" + << "Jan Holthuis"; - // This list should contains all contributors committed - // code to the Mixxx core within the past two years. - // New Contributors are added at the end. + // This list should contains all contributors committed + // code to the Mixxx core within the past two years. + // New Contributors are added at the end. QStringList recentContributors; recentContributors << "Stefan Nürnberger" @@ -82,7 +84,6 @@ DlgAbout::DlgAbout(QWidget* parent) : QDialog(parent), Ui::DlgAboutDlg() { << "Kshitij Gupta" << "Thomas Jarosch" << "Matthew Nicholson" - << "ronso0" << "Jamie Gifford" << "luzpaz" << "Sebastian Reuße" @@ -93,11 +94,11 @@ DlgAbout::DlgAbout(QWidget* parent) : QDialog(parent), Ui::DlgAboutDlg() { << "Nikolaus Einhauser" << "Nik Martin" << "Kerrick Staley" - << "Jan Holthuis" << "Raphael Graf" << "YunQiang Su" << "Sebastian Hasler" - << "Philip Gottschling"; + << "Philip Gottschling" + << "Cristiano Lacerda"; QStringList specialThanks; specialThanks diff --git a/src/library/autodj/autodjprocessor.cpp b/src/library/autodj/autodjprocessor.cpp index 13ba0bef5c..9f96a1b1d1 100644 --- a/src/library/autodj/autodjprocessor.cpp +++ b/src/library/autodj/autodjprocessor.cpp @@ -329,6 +329,18 @@ AutoDJProcessor::AutoDJError AutoDJProcessor::skipNext() { } else if (!rightDeck.isPlaying()) { removeLoadedTrackFromTopOfQueue(rightDeck); loadNextTrackFromQueue(rightDeck); + } else { + // If both decks are playing remove next track in playlist + TrackId nextId = m_pAutoDJTableModel->getTrackId(m_pAutoDJTableModel->index(0, 0)); + TrackId leftId = leftDeck.getLoadedTrack()->getId(); + TrackId rightId = rightDeck.getLoadedTrack()->getId(); + if (nextId == leftId || nextId == rightId) { + // One of the playing tracks is still on top of playlist, remove second item + m_pAutoDJTableModel->removeTrack(m_pAutoDJTableModel->index(1, 0)); + } else { + m_pAutoDJTableModel->removeTrack(m_pAutoDJTableModel->index(0, 0)); + } + maybeFillRandomTracks(); } return ADJ_OK; } @@ -898,7 +910,11 @@ bool AutoDJProcessor::removeTrackFromTopOfQueue(TrackPointer pTrack) { m_pAutoDJTableModel->appendTrack(nextId); } - // Fill random tracks if configured + maybeFillRandomTracks(); + return true; +} + +void AutoDJProcessor::maybeFillRandomTracks() { int minAutoDJCrateTracks = m_pConfig->getValueString( ConfigKey(kConfigKey, "RandomQueueMinimumAllowed")).toInt(); bool randomQueueEnabled = (((m_pConfig->getValueString( @@ -909,8 +925,6 @@ bool AutoDJProcessor::removeTrackFromTopOfQueue(TrackPointer pTrack) { qDebug() << "Randomly adding tracks"; emit randomTrackRequested(tracksToAdd); } - - return true; } void AutoDJProcessor::playerPlayChanged(DeckAttributes* thisDeck, bool playing) { diff --git a/src/library/autodj/autodjprocessor.h b/src/library/autodj/autodjprocessor.h index c03c3b3f6d..ff1f004b8f 100644 --- a/src/library/autodj/autodjprocessor.h +++ b/src/library/autodj/autodjprocessor.h @@ -277,7 +277,7 @@ class AutoDJProcessor : public QObject { // Removes the provided track from the top of the AutoDJ queue if it is // present. bool removeTrackFromTopOfQueue(TrackPointer pTrack); - + void maybeFillRandomTracks(); UserSettingsPointer m_pConfig; PlayerManagerInterface* m_pPlayerManager; PlaylistTableModel* m_pAutoDJTableModel; |