diff --git a/src/library/dao/playlistdao.cpp b/src/library/dao/playlistdao.cpp index 8bb0b34fc3a..1aa9539ec91 100644 --- a/src/library/dao/playlistdao.cpp +++ b/src/library/dao/playlistdao.cpp @@ -967,6 +967,9 @@ void PlaylistDAO::removeTracksFromPlaylists(const QList& trackIds, bool } transaction.commit(); + // We may now have empty history playlists. Remove them. + deleteAllUnlockedPlaylistsWithFewerTracks(PlaylistDAO::PLHT_SET_LOG, 1); + // update the sidebar emit playlistContentChanged(playlistIds); // If this is called by TrackCollection::purgeTracks() it will call