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

MediaLibrary: cosmetics

parent 9a257746
......@@ -68,14 +68,14 @@ void MediaLibrary::setFsFactory(std::shared_ptr<factory::IFileSystem> fsFactory)
m_fsFactory = fsFactory;
}
bool MediaLibrary::initialize( const std::string& dbPath, const std::string& snapshotPath, IMediaLibraryCb* metadataCb )
bool MediaLibrary::initialize( const std::string& dbPath, const std::string& snapshotPath, IMediaLibraryCb* mlCallback )
{
if ( m_fsFactory == nullptr )
m_fsFactory.reset( new factory::FileSystemDefaultFactory );
m_snapshotPath = snapshotPath;
m_metadataCb = metadataCb;
m_callback = mlCallback;
if ( metadataCb != nullptr )
if ( mlCallback != nullptr )
{
const char* args[] = {
"-vv",
......@@ -355,7 +355,7 @@ FilePtr MediaLibrary::addFile( const fs::IFile* file, unsigned int folderId )
std::cerr << "Failed to add file " << file->fullPath() << " to the media library" << std::endl;
return nullptr;
}
m_parser->parse( fptr, m_metadataCb );
m_parser->parse( fptr, m_callback );
return fptr;
}
......@@ -60,7 +60,7 @@ class MediaLibrary : public IMediaLibrary, public IDiscovererCb
std::shared_ptr<factory::IFileSystem> m_fsFactory;
std::vector<std::unique_ptr<IDiscoverer>> m_discoverers;
std::string m_snapshotPath;
IMediaLibraryCb* m_metadataCb;
IMediaLibraryCb* m_callback;
// Keep the parser as last field.
// The parser holds a (raw) pointer to the media library. When MediaLibrary's destructor gets called
......
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