pub fn dedup_playlist(songs: &mut Vec<Song>, distance_threshold: Option<f32>)
Expand description

Remove duplicate songs from a playlist, in place.

Two songs are considered duplicates if they either have the same, non-empty title and artist name, or if they are close enough in terms of distance.

Arguments

  • songs: The playlist to remove duplicates from.
  • distance_threshold: The distance threshold under which two songs are considered identical. If None, a default value of 0.05 will be used.