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

MediaLibrary: Increase initialize() logging

parent 07f44871
...@@ -222,8 +222,12 @@ bool MediaLibrary::validateSearchPattern( const std::string& pattern ) ...@@ -222,8 +222,12 @@ bool MediaLibrary::validateSearchPattern( const std::string& pattern )
bool MediaLibrary::initialize( const std::string& dbPath, const std::string& thumbnailPath, IMediaLibraryCb* mlCallback ) bool MediaLibrary::initialize( const std::string& dbPath, const std::string& thumbnailPath, IMediaLibraryCb* mlCallback )
{ {
LOG_INFO( "Initializing medialibrary..." );
if ( m_initialized == true ) if ( m_initialized == true )
{
LOG_INFO( "...Already initialized" );
return true; return true;
}
if ( m_deviceLister == nullptr ) if ( m_deviceLister == nullptr )
{ {
m_deviceLister = factory::createDeviceLister(); m_deviceLister = factory::createDeviceLister();
...@@ -259,15 +263,22 @@ bool MediaLibrary::initialize( const std::string& dbPath, const std::string& thu ...@@ -259,15 +263,22 @@ bool MediaLibrary::initialize( const std::string& dbPath, const std::string& thu
return false; return false;
} }
if ( m_settings.load( m_dbConnection.get() ) == false ) if ( m_settings.load( m_dbConnection.get() ) == false )
{
LOG_ERROR( "Failed to load settings" );
return false; return false;
}
if ( m_settings.dbModelVersion() != DbModelVersion ) if ( m_settings.dbModelVersion() != DbModelVersion )
{ {
if ( updateDatabaseModel( m_settings.dbModelVersion() ) == false ) if ( updateDatabaseModel( m_settings.dbModelVersion() ) == false )
{
LOG_ERROR( "Failed to update database model" );
return false; return false;
}
} }
startDiscoverer(); startDiscoverer();
startParser(); startParser();
m_initialized = true; m_initialized = true;
LOG_INFO( "Successfuly initialized" );
return true; return true;
} }
......
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