Added method for clearing and adding items to playlist, fixed type and condition for add playlistitem method