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

Notify on playlist creation

parent b4c47ac8
......@@ -648,7 +648,10 @@ PlaylistPtr MediaLibrary::createPlaylist( const std::string& name )
{
try
{
return Playlist::create( this, name );
auto pl = Playlist::create( this, name );
if ( pl != nullptr && m_modificationNotifier != nullptr )
m_modificationNotifier->notifyPlaylistCreation( pl );
return pl;
}
catch ( const sqlite::errors::Generic& ex )
{
......
......@@ -261,6 +261,7 @@ bool MetadataAnalyzer::addPlaylistMedias( IItem& item ) const
LOG_ERROR( "Failed to create playlist ", mrl, " to the media library" );
return false;
}
m_notifier->notifyPlaylistCreation( playlistPtr );
auto file = playlistPtr->addFile( *item.fileFs(),
item.parentFolder()->id(),
......
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