I am trying to get this
GitHub - connor-eg/radarr-purge-stalled-downloads: A small set of scripts that allow you to automatically blocklist stalled downloads from Radarr. Can be adapted for other software in the *arr suite (like Sonarr).
A small set of scripts that allow you to automatically blocklist stalled downloads from Radarr. Can be adapted for other software in the *arr suite (like…
github.com
To work with sonarr. My coding skill are almost zero. From what ive read on radarr and sonarr's API page there almost the same
So far I have this
remove_script.sh
Code
#! /bin/bash
# Uncomment and fix the line below if you're having to set this up in your own virtualenv environment.
# source /**YOUR VIRTUALENV DIRECTORY**/virtualenv/bin/activate
# You'll just need to point this at the get_queue.py script that sits on your machine.
parsed=($(python /srv/dev-disk-by-uuid-542ffc11-4d96-470e-a3a9-339680d29986/Data/scripts/Sonarr/get_queue.py \
| jq -r '[.records[] | select(.errorMessage == "The download is stalled with no connections") | .id] | @sh'))
# If you're on a non-English localization of Sonarr, change the text above to select the correct error.
# Yeah, it's pretty janky, but without more canonical error codes given by Sonarr this is just how it is.
for id in "${parsed[@]}"
do
# Update this as well to the correct directory.
python /srv/dev-disk-by-uuid-542ffc11-4d96-470e-a3a9-339680d29986/Data/scripts/Sonarr/del_queue.py "$id"
done
Alles anzeigen
del_queue.py
Python
from pyarr import SonarrAPI
import sys
# If this script is on the same machine as Sonarr, you can use the loopback address below.
# Actually, I've had no need to test this myself, but this whole setup should actually work over the Internet.
# In either case, you'll need to specify the port number that Sonarr is using.
host_url = 'http://10.0.0.222:8989/'
# Get this API key from your Sonarr's web UI.
api_key = 'a3f5fa101xxxxxxxxcddd7c72a5e41'
sonarr = SonarAPI(host_url, api_key)
# "Delete the thing with the ID that was passed in from the command line,
# and please delete the local files and also add the download to my blocklist."
sonarr.del_queue(sys.argv[1], True, True)
Alles anzeigen
get_queue.py
ZitatAlles anzeigenPythonAlles anzeigenfrom pyarr import SonarrAPI import json # If this script is on the same machine as Sonarr, you can use the loopback address below. # Actually, I've had no need to test this myself, but this whole setup should actually work over the Internet. # In either case, you'll need to specify the port number that Sonarr is using. host_url = 'http://10.0.0.222:8989/' # Get this API key from your Sonarr's web UI. api_key = 'a3f5fa101ceexxxxxcddd7c72a5e41' sonarr = SonarrAPI(host_url, api_key) print(json.dumps(sonarr.get_queue(page_size=100)))
the error im getting is in the txt file
I know this is nothing todo with OMV I just like this forum and have posted in the Off-Topic
Many Thanks