Skip to content

Instantly share code, notes, and snippets.

@jackskhakis
Created July 13, 2025 20:00
Show Gist options
  • Save jackskhakis/85ef83de100558fbe1750118e8d351ef to your computer and use it in GitHub Desktop.
Save jackskhakis/85ef83de100558fbe1750118e8d351ef to your computer and use it in GitHub Desktop.
this script can be run to update monitoring of all artists in lidarr to on, with all albums and search for missing enabled. this would be useful if a previous version of my script had been run which didnt have these options enabled while adding a list of new artists to lidarr
#!/bin/bash
# --- CONFIGURATION ---
lidarr_url="http://localhost:8686"
api_key="YOUR_API_KEY_HERE"
echo "📥 Fetching all existing artists from Lidarr..."
all_artists=$(curl -s "$lidarr_url/api/v1/artist" -H "X-Api-Key: $api_key")
echo "$all_artists" | jq -c '.[]' | while read -r artist; do
artist_id=$(echo "$artist" | jq '.id')
artist_name=$(echo "$artist" | jq -r '.artistName')
echo "🔧 Updating: $artist_name (ID: $artist_id)"
updated_payload=$(echo "$artist" | jq \
'.monitored = true |
.addOptions = {
monitor: "all",
searchForMissingAlbums: true
}')
curl -s -X PUT "$lidarr_url/api/v1/artist/$artist_id" \
-H "Content-Type: application/json" \
-H "X-Api-Key: $api_key" \
-H "Content-Type: application/json" \
-d "$updated_payload" > /dev/null
echo "✅ Updated: $artist_name"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment