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

FsFactory: Automatically refresh local devices list upon init

parent ebcfd388
Pipeline #11641 passed with stage
in 27 minutes and 7 seconds
......@@ -952,9 +952,8 @@ void MediaLibrary::populateNetworkFsFactories()
void MediaLibrary::addLocalFsFactory()
{
auto fsFactory = std::make_shared<factory::FileSystemFactory>( m_deviceLister );
fsFactory->refreshDevices();
m_fsFactories.emplace( begin( m_fsFactories ), std::move( fsFactory ) );
m_fsFactories.emplace( begin( m_fsFactories ),
std::make_shared<factory::FileSystemFactory>( m_deviceLister ) );
}
InitializeResult MediaLibrary::updateDatabaseModel( unsigned int previousVersion )
......
......@@ -56,6 +56,7 @@ namespace factory
FileSystemFactory::FileSystemFactory( DeviceListerPtr lister )
: m_deviceLister( std::move( lister ) )
{
refreshDevices();
}
std::shared_ptr<fs::IDirectory> FileSystemFactory::createDirectory( const std::string& mrl )
......
......@@ -139,7 +139,6 @@ void MediaLibraryTester::addLocalFsFactory()
if ( fsFactory != nullptr )
{
m_fsFactories.clear();
fsFactory->refreshDevices();
m_fsFactories.push_back( fsFactory );
}
else
......
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