#!/usr/bin/env bash
###########################################################################
##  Copyright (C) Wizardry and Steamworks 2024 - License: GNU GPLv3      ##
###########################################################################
# Inspired by Francesco Giannelli @                                       #
#   https://github.com/Sonarr/Sonarr/issues/958                           #
###########################################################################
#                                                                         #
# This script is meant to be executed via cron and will remove all broken #
# downloads from the queue, optionally remove the downloads from the      #
# download client and additionally blacklist the release.                 #
#                                                                         #
# The motiviation behind this script is the inability of the *arr servers #
# to automatically detect and remove stalled downloads or outright broken #
# releases from their own queue or the download client.                   #
#                                                                         #
# In order to use, change the parameters in the configuration settings    #
# and run this script periodically via cron.                              #
#                                                                         #
###########################################################################
 
###########################################################################
##                            CONFIGURATION                              ##
###########################################################################
 
API_KEY=49ce41a6241c4b8abb9593ddcfb9de57
HOST=http://127.0.0.1:8989/radarr/
BLOCKLIST=true
REMOVE=false
 
###########################################################################
##                              INTERNALS                                ##
###########################################################################
 
QUEUE=`curl -s -X GET "$HOST/api/v3/queue?apikey=$API_KEY" | jq -r ".[] | select(.status | try contains(\"Warning\")) | .id" | uniq`
 
IFS=$'\n'
for ID in $QUEUE; do
    curl -s -X DELETE "$HOST/api/v3/queue/$ID?apikey=$API_KEY&removeFromClient=$REMOVE&blocklist=$BLOCKLIST" 2>/dev/null 2>&1
done

linux/removing_broken_releases_from_smart_pvrs/radarr.txt ยท Last modified: 2024/01/01 19:20 by office

Access website using Tor Access website using i2p Wizardry and Steamworks PGP Key


For the contact, copyright, license, warranty and privacy terms for the usage of this website please see the contact, license, privacy, copyright.