I use the Spotify Web API to fetch the user’s public and private playlist tracks, and to remove the duplicate tracks from the playlist.

Visit Website