Created
July 13, 2025 20:00
-
-
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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