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

MediaLibrary: ignoreFolder -> banFolder

parent 9b8c72fe
......@@ -112,9 +112,9 @@ class IMediaLibrary
*/
virtual void discover( const std::string& entryPoint ) = 0;
/**
* @brief ignoreFolder will blacklist a folder for discovery
* @brief banFolder will blacklist a folder for discovery
*/
virtual bool ignoreFolder( const std::string& path ) = 0;
virtual bool banFolder( const std::string& path ) = 0;
virtual const std::string& thumbnailPath() const = 0;
virtual void setLogger( ILogger* logger ) = 0;
/**
......
......@@ -462,7 +462,7 @@ void MediaLibrary::discover( const std::string &entryPoint )
m_discoverer->discover( entryPoint );
}
bool MediaLibrary::ignoreFolder( const std::string& path )
bool MediaLibrary::banFolder( const std::string& path )
{
return Folder::blacklist( m_dbConnection.get(), path );
}
......
......@@ -83,7 +83,7 @@ class MediaLibrary : public IMediaLibrary
virtual bool deletePlaylist( unsigned int playlistId ) override;
virtual void discover( const std::string& entryPoint ) override;
bool ignoreFolder( const std::string& path ) override;
bool banFolder( const std::string& path ) override;
virtual const std::string& thumbnailPath() const override;
virtual void setLogger( ILogger* logger ) override;
......
......@@ -277,7 +277,7 @@ TEST_F( Folders, UpdateFile )
TEST_F( FoldersNoDiscover, Blacklist )
{
cbMock->prepareForWait( 1 );
ml->ignoreFolder( mock::FileSystemFactory::SubFolder );
ml->banFolder( mock::FileSystemFactory::SubFolder );
ml->discover( mock::FileSystemFactory::Root );
bool discovered = cbMock->wait();
ASSERT_TRUE( discovered );
......@@ -293,7 +293,7 @@ TEST_F( Folders, BlacklistAfterDiscovery )
auto files = f->files();
ASSERT_NE( 0u, files.size() );
ml->ignoreFolder( mock::FileSystemFactory::SubFolder );
ml->banFolder( mock::FileSystemFactory::SubFolder );
auto f2 = ml->folder( mock::FileSystemFactory::SubFolder );
ASSERT_EQ( nullptr, f2 );
}
......
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