Skip to content

Commit

Permalink
History: auto-remove empty playlists after purging tracks
Browse files Browse the repository at this point in the history
  • Loading branch information
ronso0 committed Aug 17, 2024
1 parent b0d6aa0 commit 56cf7c8
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/library/dao/playlistdao.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -967,6 +967,9 @@ void PlaylistDAO::removeTracksFromPlaylists(const QList<TrackId>& 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
Expand Down

0 comments on commit 56cf7c8

Please sign in to comment.