forked from HawksRepos/PTS-Team
-
Notifications
You must be signed in to change notification settings - Fork 55
Delete All Unmonitored from Radarr
Dominic edited this page Jan 28, 2020
·
3 revisions
Backup Radarr before running this script.
- cd /home && sudo nano radarr.sh
- Insert code below
#!/bin/bash
file="/opt/appdata/radarr/config.xml"
if [ -e "$file" ]; then
info=$(cat /opt/appdata/radarr/config.xml)
info=${info#*<ApiKey>} 1>/dev/null 2>&1
info1=$(echo "${info:0:32}") 1>/dev/null 2>&1
echo "$info1" >/var/plexguide/radarr.api
fi
HOST=http://localhost:7878
API_KEY=$(cat /var/plexguide/radarr.api)
ids=$(curl --silent $HOST/api/movie -X GET -H "X-Api-Key: $API_KEY" \ | jq '.[] | select(.monitored == not) | .id')
for id in $ids; do
echo "Deleting movie id $id"
curl --silent $HOST/api/movie/$id -X DELETE -H "X-Api-Key: $API_KEY"
done
- CRTG + O + ENTER
- sudo bash -x /home/radarr.sh
Thanks to MrDoob for creating the script and ICHIMOKU for providing info in usable format.
Wiki - Wiki
- Recommended Pre-Reading
- Server - Storage Planning
- Usenet or BitTorrent
- PTS Editions
- PTS Folder Structure
- PTS-Repos
- Common Issues
Data Transport
- Traefik
- Port Guard
- PTS Shield
- PTS Press
- Google Cloud - GCE
- Hetzner Cloud
- PTS Fork
- Extra PTS Commands
- PTS Vault - Data Storage
- PTSPatrol
- Plex AutoScan in Docker Container
- Plex_Dupefiner
- Traktarr
- System & Network Auditor
- PreInstaller & UnInstaller
Core Apps [Expand]
Community Apps [Expand]
- AirSonic
- Bazarr
- Bitwarden
- BookSonic
- cAdvisor
- Cloud Commander
- Deluge
- DelugeVPN
- Dozzle
- Duplicati
- Filebrowser
- FlexGet
- Gazee
- Headphones
- Heimdall
- HomeAssistant
- jd2-openvpn
- Kitana
- Logarr
- MakeMKV
- MariaDB
- McMyadmin
- MEDUSA
- Mellow
- Miniflux
- Monitorr
- Muximux
- Mylar
- NextCloud
- NowShowing
- NZBHydra2
- Organizr
- plpp
- pyLoad
- qBittorrent
- QBittorrent VPN
- radarrsyncarr
- Resilio
- rflood-openvpn
- rutorrent-openvpn
- Shoko Anime Server
- SpeedTest
- SyncLounge
- Teamspeak3
- The Lounge
- Transmission
- Trakt.or
- Ubooquity
- Varken
- vnc-xfce
- vnstat
- ZeroTier