Skip to content

Instantly share code, notes, and snippets.

@at0dd
Created January 4, 2025 17:51
Show Gist options
  • Select an option

  • Save at0dd/775ecf43abc5f5b9f2f3d8cfbf0585cb to your computer and use it in GitHub Desktop.

Select an option

Save at0dd/775ecf43abc5f5b9f2f3d8cfbf0585cb to your computer and use it in GitHub Desktop.
Export a list of movies from Radarr and a list of tv shows from Sonarr.
#!/bin/bash
RADARR_API_KEY=""
RADARR_URL="http://ip:7878/api/v3/movie"
SONARR_API_KEY=""
SONARR_URL="http://ip:8989/api/v3/series"
curl -s -H "X-Api-Key: $RADARR_API_KEY" "$RADARR_URL" | jq -r '.[] | "\(.title) (\(.year))"' | sort > movie_list.txt
curl -s -H "X-Api-Key: $SONARR_API_KEY" "$SONARR_URL" | jq -r '.[] | "\(.title) (\(.year)) - \(.seasons | map(select(.statistics.episodeFileCount > 0) | "Season \(.seasonNumber): \(.statistics.episodeFileCount)") | join(", "))"' | sort > tv_list.txt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment