Upload files to "/"
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
#!/bin/bash
|
||||
|
||||
# --- CHANGE THESE VALUES ---
|
||||
API_KEY="<your_api_key>"
|
||||
SONARR_URL="http://localhost:8989"
|
||||
# ---------------------------
|
||||
|
||||
# 1. Refresh all series
|
||||
echo "Refreshing all series..."
|
||||
curl -X POST "$SONARR_URL/api/v3/command" \
|
||||
-H "X-Api-Key: $API_KEY" \
|
||||
-H "Content-Type: application/json" \
|
||||
-d '{"name": "RefreshSeries"}'
|
||||
|
||||
# Small pause to let the system breathe
|
||||
sleep 5
|
||||
|
||||
# 2. Trigger the global search for missing episodes
|
||||
echo "Searching for all missing episodes..."
|
||||
curl -X POST "$SONARR_URL/api/v3/command" \
|
||||
-H "X-Api-Key: $API_KEY" \
|
||||
-H "Content-Type: application/json" \
|
||||
-d '{"name": "MissingEpisodeSearch"}'
|
||||
|
||||
# 3. Force an RSS sync (Optional but recommended)
|
||||
echo "Syncing RSS feeds..."
|
||||
curl -X POST "$SONARR_URL/api/v3/command" \
|
||||
-H "X-Api-Key: $API_KEY" \
|
||||
-H "Content-Type: application/json" \
|
||||
-d '{"name": "RssSync"}'
|
||||
|
||||
echo "All commands sent successfully!"
|
||||
Reference in New Issue
Block a user