Lists duplicate Spotify tracks in a given playlist
Playlist must be specified as the first argument and can be either a Spotify playlist ID or a full playlist name (see spotify_playlists.sh)
You can combine this with spotify_uri_to_name.sh to see the duplicate track names eg. for a playlist called 'My Playlist':
${0##*/}'My Playlist'
If \$SPOTIFY_DUPLICATE_TRACK_POSITIONS is setthen outputs the track position (zero-indexed to align with the Spotify API) as the first column with the URI as the second column
$usage_playlist_help
$usage_auth_help
"
# used by usage() in lib/utils.sh
# shellcheck disable=SC2034
usage_args="<playlist_name_or_id>"
help_usage "$@"
min_args 1"$@"
playlist="$1"
shift|| :
# requires authorized token
exportSPOTIFY_PRIVATE=1
spotify_token
# this script returns the ID if it's already in the correct format, otherwise queries and returns the playlist ID for the playlist