diff options
Diffstat (limited to 'src/library/library.cpp')
-rw-r--r-- | src/library/library.cpp | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/library/library.cpp b/src/library/library.cpp index 27ab18ce0a..915b78d939 100644 --- a/src/library/library.cpp +++ b/src/library/library.cpp @@ -12,6 +12,9 @@ #include "library/autodj/autodjfeature.h" #include "library/banshee/bansheefeature.h" #include "library/browse/browsefeature.h" +#ifdef __ENGINEPRIME__ +#include "library/export/libraryexporter.h" +#endif #include "library/externaltrackcollection.h" #include "library/itunes/itunesfeature.h" #include "library/library_preferences.h" @@ -90,12 +93,23 @@ Library::Library( this, m_pConfig); addFeature(m_pMixxxLibraryFeature); +#ifdef __ENGINEPRIME__ + connect(m_pMixxxLibraryFeature, + &MixxxLibraryFeature::exportLibrary, + this, + &Library::exportLibrary); +#endif addFeature(new AutoDJFeature(this, m_pConfig, pPlayerManager)); m_pPlaylistFeature = new PlaylistFeature(this, UserSettingsPointer(m_pConfig)); addFeature(m_pPlaylistFeature); + m_pCrateFeature = new CrateFeature(this, m_pConfig); addFeature(m_pCrateFeature); +#ifdef __ENGINEPRIME__ + connect(m_pCrateFeature, &CrateFeature::exportAllCrates, this, &Library::exportLibrary); + connect(m_pCrateFeature, &CrateFeature::exportCrate, this, &Library::exportCrate); +#endif BrowseFeature* browseFeature = new BrowseFeature( this, m_pConfig, pRecordingManager); @@ -560,3 +574,13 @@ void Library::searchTracksInCollection(const QString& query) { emit switchToView(m_sTrackViewName); m_pSidebarModel->activateDefaultSelection(); } + +#ifdef __ENGINEPRIME__ +std::unique_ptr<mixxx::LibraryExporter> Library::makeLibraryExporter( + QWidget* parent) { + // New object is expected to be owned (and lifecycle-managed) + // by the supplied parent widget. + return std::make_unique<mixxx::LibraryExporter>( + parent, m_pConfig, m_pTrackCollectionManager); +} +#endif |