diff --git a/src/coreservices.cpp b/src/coreservices.cpp index 8523ee8ae99..e37a798ce27 100644 --- a/src/coreservices.cpp +++ b/src/coreservices.cpp @@ -16,6 +16,7 @@ #include "engine/enginemaster.h" #include "library/coverartcache.h" #include "library/library.h" +#include "library/library_prefs.h" #include "library/trackcollection.h" #include "library/trackcollectionmanager.h" #include "mixer/playerinfo.h" @@ -375,7 +376,7 @@ void CoreServices::initialize(QApplication* pApp) { // Scan the library for new files and directories bool rescan = pConfig->getValue( - ConfigKey("[Library]", "RescanOnStartup")); + library::prefs::kRescanOnStartupConfigKey); // rescan the library if we get a new plugin QList prev_plugins_list = pConfig->getValueString( diff --git a/src/library/dao/playlistdao.cpp b/src/library/dao/playlistdao.cpp index 805739967f8..c38fcc81ecf 100644 --- a/src/library/dao/playlistdao.cpp +++ b/src/library/dao/playlistdao.cpp @@ -227,7 +227,7 @@ void PlaylistDAO::deletePlaylist(const int playlistId) { } } -int PlaylistDAO::deleteAllPlaylistsWithFewerTracks( +int PlaylistDAO::deleteAllUnlockedPlaylistsWithFewerTracks( PlaylistDAO::HiddenType type, int minNumberOfTracks) { VERIFY_OR_DEBUG_ASSERT(minNumberOfTracks > 0) { return 0; // nothing to do, probably unintended invocation @@ -238,7 +238,7 @@ int PlaylistDAO::deleteAllPlaylistsWithFewerTracks( "SELECT id FROM Playlists " "WHERE (SELECT count(playlist_id) FROM PlaylistTracks WHERE " "Playlists.ID = PlaylistTracks.playlist_id) < :length AND " - "Playlists.hidden = :hidden")); + "Playlists.hidden = :hidden AND Playlists.locked = 0")); query.bindValue(":hidden", static_cast(type)); query.bindValue(":length", minNumberOfTracks); if (!query.exec()) { diff --git a/src/library/dao/playlistdao.h b/src/library/dao/playlistdao.h index e7fa7354ab5..a5bda75b62f 100644 --- a/src/library/dao/playlistdao.h +++ b/src/library/dao/playlistdao.h @@ -58,7 +58,8 @@ class PlaylistDAO : public QObject, public virtual DAO { /// Delete Playlists with fewer entries then "length" /// Needs to be called inside a transaction. /// @return number of deleted playlists, -1 on error - int deleteAllPlaylistsWithFewerTracks(PlaylistDAO::HiddenType type, int minNumberOfTracks); + int deleteAllUnlockedPlaylistsWithFewerTracks(PlaylistDAO::HiddenType type, + int minNumberOfTracks); // Rename a playlist void renamePlaylist(const int playlistId, const QString& newName); // Lock or unlock a playlist diff --git a/src/library/library_prefs.cpp b/src/library/library_prefs.cpp index b3b1e3d7316..38b6a4d17e1 100644 --- a/src/library/library_prefs.cpp +++ b/src/library/library_prefs.cpp @@ -13,16 +13,36 @@ const ConfigKey mixxx::library::prefs::kLegacyDirectoryConfigKey = const QString mixxx::library::prefs::kConfigGroup = QStringLiteral("[Library]"); +const ConfigKey mixxx::library::prefs::kRescanOnStartupConfigKey = + ConfigKey{ + mixxx::library::prefs::kConfigGroup, + QStringLiteral("RescanOnStartup")}; + const ConfigKey mixxx::library::prefs::kKeyNotationConfigKey = ConfigKey{ mixxx::library::prefs::kConfigGroup, QStringLiteral("key_notation")}; +const ConfigKey mixxx::library::prefs::kTrackDoubleClickActionConfigKey = + ConfigKey{ + mixxx::library::prefs::kConfigGroup, + QStringLiteral("TrackLoadAction")}; + const ConfigKey mixxx::library::prefs::kEditMetadataSelectedClickConfigKey = ConfigKey{ mixxx::library::prefs::kConfigGroup, QStringLiteral("EditMetadataSelectedClick")}; +const ConfigKey mixxx::library::prefs::kHistoryMinTracksToKeepConfigKey = + ConfigKey{ + mixxx::library::prefs::kConfigGroup, + QStringLiteral("history_min_tracks_to_keep")}; + +const ConfigKey mixxx::library::prefs::kHistoryTrackDuplicateDistanceConfigKey = + ConfigKey{ + mixxx::library::prefs::kConfigGroup, + QStringLiteral("history_track_duplicate_distance")}; + const ConfigKey mixxx::library::prefs::kSearchDebouncingTimeoutMillisConfigKey = ConfigKey{ mixxx::library::prefs::kConfigGroup, @@ -39,3 +59,8 @@ const ConfigKey mixxx::library::prefs::kSyncSeratoMetadataConfigKey = ConfigKey{ mixxx::library::prefs::kConfigGroup, QStringLiteral("SeratoMetadataExport")}; + +const ConfigKey mixxx::library::prefs::kUseRelativePathOnExportConfigKey = + ConfigKey{ + mixxx::library::prefs::kConfigGroup, + QStringLiteral("UseRelativePathOnExport")}; diff --git a/src/library/library_prefs.h b/src/library/library_prefs.h index cf3bf3b6cb3..d79c7c74a42 100644 --- a/src/library/library_prefs.h +++ b/src/library/library_prefs.h @@ -12,12 +12,24 @@ extern const ConfigKey kLegacyDirectoryConfigKey; extern const QString kConfigGroup; +extern const ConfigKey kRescanOnStartupConfigKey; + extern const ConfigKey kKeyNotationConfigKey; +extern const ConfigKey kTrackDoubleClickActionConfigKey; + extern const ConfigKey kSearchDebouncingTimeoutMillisConfigKey; extern const ConfigKey kEditMetadataSelectedClickConfigKey; +extern const ConfigKey kHistoryMinTracksToKeepConfigKey; + +const int kHistoryMinTracksToKeepDefault = 1; + +extern const ConfigKey kHistoryTrackDuplicateDistanceConfigKey; + +const int kHistoryTrackDuplicateDistanceDefault = 6; + const bool kEditMetadataSelectedClickDefault = false; extern const ConfigKey kSyncTrackMetadataConfigKey; @@ -26,6 +38,8 @@ extern const ConfigKey kSyncSeratoMetadataConfigKey; extern const ConfigKey kSyncSeratoMetadataConfigKey; +extern const ConfigKey kUseRelativePathOnExportConfigKey; + } // namespace prefs } // namespace library diff --git a/src/library/trackset/baseplaylistfeature.cpp b/src/library/trackset/baseplaylistfeature.cpp index 8219477a3e1..d833f650c13 100644 --- a/src/library/trackset/baseplaylistfeature.cpp +++ b/src/library/trackset/baseplaylistfeature.cpp @@ -7,6 +7,7 @@ #include "controllers/keyboard/keyboardeventfilter.h" #include "library/export/trackexportwizard.h" #include "library/library.h" +#include "library/library_prefs.h" #include "library/parser.h" #include "library/parsercsv.h" #include "library/parserm3u.h" @@ -31,6 +32,8 @@ const ConfigKey kConfigKeyLastImportExportPlaylistDirectory( } // anonymous namespace +using namespace mixxx::library::prefs; + BasePlaylistFeature::BasePlaylistFeature( Library* pLibrary, UserSettingsPointer pConfig, @@ -568,7 +571,7 @@ void BasePlaylistFeature::slotExportPlaylist() { // check config if relative paths are desired bool useRelativePath = m_pConfig->getValue( - ConfigKey("[Library]", "UseRelativePathOnExport")); + kUseRelativePathOnExportConfigKey); if (fileLocation.endsWith(".csv", Qt::CaseInsensitive)) { ParserCsv::writeCSVFile(fileLocation, pPlaylistTableModel.data(), useRelativePath); diff --git a/src/library/trackset/crate/cratefeature.cpp b/src/library/trackset/crate/cratefeature.cpp index fcdb49db3ed..d7b1c516f21 100644 --- a/src/library/trackset/crate/cratefeature.cpp +++ b/src/library/trackset/crate/cratefeature.cpp @@ -9,6 +9,7 @@ #include "library/export/trackexportwizard.h" #include "library/library.h" +#include "library/library_prefs.h" #include "library/parser.h" #include "library/parsercsv.h" #include "library/parserm3u.h" @@ -42,6 +43,8 @@ const ConfigKey kConfigKeyLastImportExportCrateDirectoryKey( } // anonymous namespace +using namespace mixxx::library::prefs; + CrateFeature::CrateFeature(Library* pLibrary, UserSettingsPointer pConfig) : BaseTrackSetFeature(pLibrary, pConfig, "CRATEHOME", QStringLiteral("crates")), @@ -739,7 +742,7 @@ void CrateFeature::slotExportPlaylist() { // check config if relative paths are desired bool useRelativePath = m_pConfig->getValue( - ConfigKey("[Library]", "UseRelativePathOnExport")); + kUseRelativePathOnExportConfigKey); // Create list of files of the crate // Create a new table model since the main one might have an active search. diff --git a/src/library/trackset/setlogfeature.cpp b/src/library/trackset/setlogfeature.cpp index 5cadbb723f7..c2af49459fd 100644 --- a/src/library/trackset/setlogfeature.cpp +++ b/src/library/trackset/setlogfeature.cpp @@ -6,6 +6,7 @@ #include "control/controlobject.h" #include "library/library.h" +#include "library/library_prefs.h" #include "library/playlisttablemodel.h" #include "library/queryutil.h" #include "library/trackcollection.h" @@ -23,6 +24,8 @@ namespace { constexpr int kNumToplevelHistoryEntries = 5; } +using namespace mixxx::library::prefs; + SetlogFeature::SetlogFeature( Library* pLibrary, UserSettingsPointer pConfig) @@ -36,13 +39,11 @@ SetlogFeature::SetlogFeature( /*keep deleted tracks*/ true), QStringLiteral("SETLOGHOME"), QStringLiteral("history")), - m_playlistId(kInvalidPlaylistId) { - // clear old empty entries - ScopedTransaction transaction(pLibrary->trackCollectionManager() - ->internalCollection() - ->database()); - m_playlistDao.deleteAllPlaylistsWithFewerTracks(PlaylistDAO::HiddenType::PLHT_SET_LOG, 1); - transaction.commit(); + m_playlistId(kInvalidPlaylistId), + m_pLibrary(pLibrary), + m_pConfig(pConfig) { + // remove unneeded entries + deleteAllUnlockedPlaylistsWithFewerTracks(); //construct child model m_pSidebarModel->setRootItem(TreeItem::newRoot(this)); @@ -72,6 +73,8 @@ SetlogFeature::~SetlogFeature() { m_playlistDao.tracksInPlaylist(m_playlistId) == 0) { m_playlistDao.deletePlaylist(m_playlistId); } + // Also clean history up when shutting down in case the track threshold changed + deleteAllUnlockedPlaylistsWithFewerTracks(); } QVariant SetlogFeature::title() { @@ -88,6 +91,18 @@ void SetlogFeature::bindLibraryWidget( m_libraryWidget = QPointer(libraryWidget); } +void SetlogFeature::deleteAllUnlockedPlaylistsWithFewerTracks() { + ScopedTransaction transaction(m_pLibrary->trackCollectionManager() + ->internalCollection() + ->database()); + int minTrackCount = m_pConfig->getValue( + kHistoryMinTracksToKeepConfigKey, + kHistoryMinTracksToKeepDefault); + m_playlistDao.deleteAllUnlockedPlaylistsWithFewerTracks(PlaylistDAO::HiddenType::PLHT_SET_LOG, + minTrackCount); + transaction.commit(); +} + void SetlogFeature::onRightClick(const QPoint& globalPos) { Q_UNUSED(globalPos); m_lastRightClickedIndex = QModelIndex(); @@ -279,6 +294,8 @@ void SetlogFeature::slotGetNewPlaylist() { qDebug() << "Setlog playlist Creation Failed"; qDebug() << "An unknown error occurred while creating playlist: " << set_log_name; + } else { + m_recentTracks.clear(); } reloadChildModel(m_playlistId); // For moving selection @@ -366,8 +383,10 @@ void SetlogFeature::slotPlayingTrackChanged(TrackPointer currentPlayingTrack) { m_recentTracks.push_front(currentPlayingTrackId); // Keep a window of 6 tracks (inspired by 2 decks, 4 samplers) - constexpr int kRecentTrackWindow = 6; - while (m_recentTracks.size() > kRecentTrackWindow) { + const unsigned int recentTrackWindow = m_pConfig->getValue( + kHistoryTrackDuplicateDistanceConfigKey, + kHistoryTrackDuplicateDistanceDefault); + while (m_recentTracks.size() > recentTrackWindow) { m_recentTracks.pop_back(); } } diff --git a/src/library/trackset/setlogfeature.h b/src/library/trackset/setlogfeature.h index a477a61be25..b66c0145e26 100644 --- a/src/library/trackset/setlogfeature.h +++ b/src/library/trackset/setlogfeature.h @@ -7,6 +7,8 @@ #include "library/trackset/baseplaylistfeature.h" #include "preferences/usersettings.h" +class Library; + class SetlogFeature : public BasePlaylistFeature { Q_OBJECT @@ -40,6 +42,7 @@ class SetlogFeature : public BasePlaylistFeature { void slotPlaylistTableRenamed(int playlistId, const QString& newName) override; private: + void deleteAllUnlockedPlaylistsWithFewerTracks(); void reloadChildModel(int playlistId); QString getRootViewHtml() const override; @@ -48,4 +51,6 @@ class SetlogFeature : public BasePlaylistFeature { QAction* m_pStartNewPlaylist; int m_playlistId; QPointer m_libraryWidget; + Library* m_pLibrary; + UserSettingsPointer m_pConfig; }; diff --git a/src/preferences/dialog/dlgpreflibrary.cpp b/src/preferences/dialog/dlgpreflibrary.cpp index 87fed403014..ee0802c7937 100644 --- a/src/preferences/dialog/dlgpreflibrary.cpp +++ b/src/preferences/dialog/dlgpreflibrary.cpp @@ -191,6 +191,9 @@ void DlgPrefLibrary::initializeDirList() { void DlgPrefLibrary::slotResetToDefaults() { checkBox_library_scan->setChecked(false); + spinbox_history_track_duplicate_distance->setValue( + kHistoryTrackDuplicateDistanceDefault); + spinbox_history_min_tracks_to_keep->setValue(1); checkBox_SyncTrackMetadata->setChecked(false); checkBox_SeratoMetadataExport->setChecked(false); checkBox_use_relative_path->setChecked(false); @@ -199,8 +202,8 @@ void DlgPrefLibrary::slotResetToDefaults() { checkBox_show_itunes->setChecked(true); checkBox_show_traktor->setChecked(true); checkBox_show_rekordbox->setChecked(true); - radioButton_dbclick_bottom->setChecked(false); checkBoxEditMetadataSelectedClicked->setChecked(kEditMetadataSelectedClickDefault); + radioButton_dbclick_bottom->setChecked(false); radioButton_dbclick_top->setChecked(false); radioButton_dbclick_deck->setChecked(true); spinBoxRowHeight->setValue(Library::kDefaultRowHeightPx); @@ -212,13 +215,22 @@ void DlgPrefLibrary::slotResetToDefaults() { void DlgPrefLibrary::slotUpdate() { initializeDirList(); checkBox_library_scan->setChecked(m_pConfig->getValue( - ConfigKey("[Library]","RescanOnStartup"), false)); + kRescanOnStartupConfigKey, false)); + + spinbox_history_track_duplicate_distance->setValue(m_pConfig->getValue( + kHistoryTrackDuplicateDistanceConfigKey, + kHistoryTrackDuplicateDistanceDefault)); + spinbox_history_min_tracks_to_keep->setValue(m_pConfig->getValue( + kHistoryMinTracksToKeepConfigKey, + kHistoryMinTracksToKeepDefault)); + checkBox_SyncTrackMetadata->setChecked( m_pConfig->getValue(kSyncTrackMetadataConfigKey, false)); checkBox_SeratoMetadataExport->setChecked( m_pConfig->getValue(kSyncSeratoMetadataConfigKey, false)); checkBox_use_relative_path->setChecked(m_pConfig->getValue( - ConfigKey("[Library]","UseRelativePathOnExport"), false)); + kUseRelativePathOnExportConfigKey, false)); + checkBox_show_rhythmbox->setChecked(m_pConfig->getValue( ConfigKey("[Library]","ShowRhythmboxLibrary"), true)); checkBox_show_banshee->setChecked(m_pConfig->getValue( @@ -233,7 +245,7 @@ void DlgPrefLibrary::slotUpdate() { ConfigKey("[Library]", "ShowSeratoLibrary"), true)); switch (m_pConfig->getValue( - ConfigKey("[Library]", "TrackLoadAction"), + kTrackDoubleClickActionConfigKey, static_cast(TrackDoubleClickAction::LoadToDeck))) { case static_cast(TrackDoubleClickAction::AddToAutoDJBottom): radioButton_dbclick_bottom->setChecked(true); @@ -245,8 +257,8 @@ void DlgPrefLibrary::slotUpdate() { radioButton_dbclick_ignore->setChecked(true); break; default: - radioButton_dbclick_deck->setChecked(true); - break; + radioButton_dbclick_deck->setChecked(true); + break; } bool editMetadataSelectedClick = m_pConfig->getValue( @@ -383,16 +395,24 @@ void DlgPrefLibrary::slotSeratoMetadataExportClicked(bool checked) { } void DlgPrefLibrary::slotApply() { - m_pConfig->set(ConfigKey("[Library]","RescanOnStartup"), - ConfigValue((int)checkBox_library_scan->isChecked())); + m_pConfig->set(kRescanOnStartupConfigKey, + ConfigValue((int)checkBox_library_scan->isChecked())); + + m_pConfig->set(kHistoryTrackDuplicateDistanceConfigKey, + ConfigValue(spinbox_history_track_duplicate_distance->value())); + m_pConfig->set(kHistoryMinTracksToKeepConfigKey, + ConfigValue(spinbox_history_min_tracks_to_keep->value())); + m_pConfig->set( kSyncTrackMetadataConfigKey, ConfigValue{checkBox_SyncTrackMetadata->isChecked()}); m_pConfig->set( kSyncSeratoMetadataConfigKey, ConfigValue{checkBox_SeratoMetadataExport->isChecked()}); - m_pConfig->set(ConfigKey("[Library]","UseRelativePathOnExport"), - ConfigValue((int)checkBox_use_relative_path->isChecked())); + + m_pConfig->set(kUseRelativePathOnExportConfigKey, + ConfigValue((int)checkBox_use_relative_path->isChecked())); + m_pConfig->set(ConfigKey("[Library]","ShowRhythmboxLibrary"), ConfigValue((int)checkBox_show_rhythmbox->isChecked())); m_pConfig->set(ConfigKey("[Library]","ShowBansheeLibrary"), @@ -405,6 +425,7 @@ void DlgPrefLibrary::slotApply() { ConfigValue((int)checkBox_show_rekordbox->isChecked())); m_pConfig->set(ConfigKey("[Library]", "ShowSeratoLibrary"), ConfigValue((int)checkBox_show_serato->isChecked())); + int dbclick_status; if (radioButton_dbclick_bottom->isChecked()) { dbclick_status = static_cast(TrackDoubleClickAction::AddToAutoDJBottom); @@ -415,8 +436,8 @@ void DlgPrefLibrary::slotApply() { } else { // radioButton_dbclick_ignore dbclick_status = static_cast(TrackDoubleClickAction::Ignore); } - m_pConfig->set(ConfigKey("[Library]","TrackLoadAction"), - ConfigValue(dbclick_status)); + m_pConfig->set(kTrackDoubleClickActionConfigKey, + ConfigValue(dbclick_status)); m_pConfig->set(kEditMetadataSelectedClickConfigKey, ConfigValue(checkBoxEditMetadataSelectedClicked->checkState())); diff --git a/src/preferences/dialog/dlgpreflibrary.h b/src/preferences/dialog/dlgpreflibrary.h index ff4f2aa4fda..6a2f12310a4 100644 --- a/src/preferences/dialog/dlgpreflibrary.h +++ b/src/preferences/dialog/dlgpreflibrary.h @@ -5,7 +5,6 @@ #include #include -#include "defs_urls.h" #include "library/library_decl.h" #include "preferences/dialog/dlgpreferencepage.h" #include "preferences/dialog/ui_dlgpreflibrarydlg.h" diff --git a/src/preferences/dialog/dlgpreflibrarydlg.ui b/src/preferences/dialog/dlgpreflibrarydlg.ui index f08d8af052f..c20e4e0c24c 100644 --- a/src/preferences/dialog/dlgpreflibrarydlg.ui +++ b/src/preferences/dialog/dlgpreflibrarydlg.ui @@ -16,50 +16,13 @@ - + - Library + Music Directories - - - - - true - - - - 100 - 10 - - - - - - - Music Directories: - - - false - - - dirList - - - - - - - - - - If removed, Mixxx will no longer watch this directory and its subdirectories for new tracks. - - - Remove - - - - + + + QAbstractItemView::NoEditTriggers @@ -75,7 +38,8 @@ - + + @@ -88,7 +52,8 @@ - + + If an existing music directory is moved, Mixxx doesn't know where to find the audio files in it. Choose Relink to select the music directory in its new location. <br/> This will re-establish the links to the audio files in the Mixxx library. @@ -98,6 +63,32 @@ + + + + + + + + If removed, Mixxx will no longer watch this directory and its subdirectories for new tracks. + + + Remove + + + + + + + + Rescan directories on start-up + + + true + + + + @@ -110,7 +101,7 @@ false - + @@ -130,7 +121,7 @@ Track Metadata Synchronization - + @@ -154,37 +145,153 @@ + - + - Miscellaneous + Track Table View - - - + + + + + + Edit metadata after clicking selected track + + + + + + + + Track Double-Click Action: + + + Qt::AlignLeft|Qt::AlignVCenter + + + + + + - Rescan library on start-up + Load track to next available deck true + + + + Add track to Auto DJ queue (bottom) + + + + + + + Add track to Auto DJ queue (top) + + + + + + + Ignore + + + + + + + + + + + + Session History + + + - + - Edit metadata after clicking selected track + Track duplicate distance + + + Qt::AlignLeft|Qt::AlignVCenter + + + true + + + + When playing a track again log it to the session history only if more than N other tracks have been played in the meantime + + + 0 + + + 99 + + + 1 + + + + + + + History playlist with less than N tracks will be deleted<br/><br/>Note: the cleanup will be performed during startup and shutdown of Mixxx. + + + Delete history playlist with less than N tracks + + + Qt::AlignLeft|Qt::AlignVCenter + + + + + + + 1 + + + 99 + + + 1 + + + + + + + + + + + + Miscellaneous + + + + Use relative paths for playlist export if possible - + + Library Row Height: @@ -194,7 +301,7 @@ - + px @@ -210,7 +317,8 @@ - + + Library Font: @@ -220,21 +328,22 @@ - + true - + ... - + + Search-as-you-type timeout: @@ -244,67 +353,24 @@ - + ms - - - - - - - - - - Track Double-Click Action - - - - - - Load track to next available deck - - - true - - - - - - - Add track to Auto DJ queue (bottom) - - - - - - - Add track to Auto DJ queue (top) - - - - - - - Ignore - - - - + External Libraries - + @@ -389,13 +455,13 @@ - Settings Folder + Settings Directory - The Mixxx settings folder contains the library database, various configuration files, log files, track analysis data, as well as custom controller mappings. + The Mixxx settings directory contains the library database, various configuration files, log files, track analysis data, as well as custom controller mappings. true @@ -459,19 +525,21 @@ PushButtonAddDir PushButtonRelocateDir PushButtonRemoveDir + checkBox_library_scan checkBox_SyncTrackMetadata checkBox_SeratoMetadataExport - checkBox_library_scan checkBoxEditMetadataSelectedClicked + radioButton_dbclick_deck + radioButton_dbclick_bottom + radioButton_dbclick_top + radioButton_dbclick_ignore + spinbox_history_track_duplicate_distance + spinbox_history_min_tracks_to_keep checkBox_use_relative_path spinBoxRowHeight libraryFont libraryFontButton searchDebouncingTimeoutSpinBox - radioButton_dbclick_deck - radioButton_dbclick_bottom - radioButton_dbclick_top - radioButton_dbclick_ignore checkBox_show_rhythmbox checkBox_show_banshee checkBox_show_itunes diff --git a/src/widget/wtracktableview.cpp b/src/widget/wtracktableview.cpp index 4060ca8d011..d3ba4262afd 100644 --- a/src/widget/wtracktableview.cpp +++ b/src/widget/wtracktableview.cpp @@ -352,9 +352,9 @@ void WTrackTableView::initTrackMenu() { // slot void WTrackTableView::slotMouseDoubleClicked(const QModelIndex& index) { - // Read the current TrackLoadAction settings + // Read the current TrackDoubleClickAction setting int doubleClickActionConfigValue = - m_pConfig->getValue(ConfigKey("[Library]", "TrackLoadAction"), + m_pConfig->getValue(mixxx::library::prefs::kTrackDoubleClickActionConfigKey, static_cast(DlgPrefLibrary::TrackDoubleClickAction::LoadToDeck)); DlgPrefLibrary::TrackDoubleClickAction doubleClickAction = static_cast(