You could factor this out into a separate method so you can just re-use it in CPlaylistOperations::Insert.