Skip to content

Instantly share code, notes, and snippets.

@pcon
Created November 25, 2024 15:33
Show Gist options
  • Save pcon/044e5e58b70963c28ecbee43bd8e99ce to your computer and use it in GitHub Desktop.
Save pcon/044e5e58b70963c28ecbee43bd8e99ce to your computer and use it in GitHub Desktop.
Output all the duplicated content in your Plex library
export TOKEN="123abc"
export SERVER="http://localhost:32400"
curl -s -X GET -H "X-Plex-Token: $TOKEN" -H "Accept: application/json" $SERVER/library/sections/1/all | \
jq ".MediaContainer.Metadata |= map(select(.Media | length > 1))" | \
jq '.MediaContainer.Metadata[].Media[].Part[].file'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment