Commit 5d0034ac authored by Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen

Library: Update to recent medialibrary API change

parent 3c25eb66
...@@ -115,7 +115,7 @@ MainWindow::MainWindow( Backend::IBackend* backend, QWidget *parent ) ...@@ -115,7 +115,7 @@ MainWindow::MainWindow( Backend::IBackend* backend, QWidget *parent )
} }
}); });
connect( Core::instance()->library(), &Library::discoveryStarted, this, connect( Core::instance()->library(), &Library::discoveryProgress, this,
[this](const QString& folder) { [this](const QString& folder) {
m_ui.statusbar->showMessage( "Discovering " + folder + "...", 2500 ); m_ui.statusbar->showMessage( "Discovering " + folder + "...", 2500 );
}, Qt::QueuedConnection ); }, Qt::QueuedConnection );
......
...@@ -298,9 +298,14 @@ Library::onTracksDeleted( std::vector<int64_t> ) ...@@ -298,9 +298,14 @@ Library::onTracksDeleted( std::vector<int64_t> )
} }
void void
Library::onDiscoveryStarted( const std::string& entryPoint ) Library::onDiscoveryStarted( const std::string& )
{ {
emit discoveryStarted( QString::fromStdString( entryPoint ) ); }
void
Library::onDiscoveryProgress( const std::string& entryPoint )
{
emit discoveryProgress( QString::fromStdString( entryPoint ) );
} }
void void
......
...@@ -101,6 +101,7 @@ private: ...@@ -101,6 +101,7 @@ private:
virtual void onTracksAdded( std::vector<medialibrary::AlbumTrackPtr> tracks ) override; virtual void onTracksAdded( std::vector<medialibrary::AlbumTrackPtr> tracks ) override;
virtual void onTracksDeleted( std::vector<int64_t> trackIds ) override; virtual void onTracksDeleted( std::vector<int64_t> trackIds ) override;
virtual void onDiscoveryStarted( const std::string& entryPoint ) override; virtual void onDiscoveryStarted( const std::string& entryPoint ) override;
virtual void onDiscoveryProgress( const std::string& entryPoint ) override;
virtual void onDiscoveryCompleted( const std::string& entryPoint ) override; virtual void onDiscoveryCompleted( const std::string& entryPoint ) override;
virtual void onParsingStatsUpdated( uint32_t percent ) override; virtual void onParsingStatsUpdated( uint32_t percent ) override;
...@@ -126,7 +127,7 @@ signals: ...@@ -126,7 +127,7 @@ signals:
void cleanStateChanged( bool newState ); void cleanStateChanged( bool newState );
void progressUpdated( int percent ); void progressUpdated( int percent );
void discoveryStarted( QString ); void discoveryProgress( QString );
void discoveryCompleted( QString ); void discoveryCompleted( QString );
}; };
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment