arr-interconnect: drop manual 1080p quality floors
Recyclarr now manages quality definitions via TRaSH templates, so the hand-rolled minSize=10 floor is redundant — every sync would overwrite it anyway. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
parent
e99bc7cc9b
commit
3f2c88da94
1 changed files with 1 additions and 49 deletions
|
|
@ -2,7 +2,7 @@
|
|||
let
|
||||
interconnectScript = pkgs.writeShellScript "arr-interconnect" ''
|
||||
set -euo pipefail
|
||||
PATH="${lib.makeBinPath [ pkgs.curl pkgs.jq pkgs.gnused pkgs.gnugrep pkgs.gawk pkgs.coreutils pkgs.systemd ]}:$PATH"
|
||||
PATH="${lib.makeBinPath [ pkgs.curl pkgs.jq pkgs.gnused pkgs.gnugrep pkgs.coreutils pkgs.systemd ]}:$PATH"
|
||||
|
||||
BASE="http://127.0.0.1"
|
||||
|
||||
|
|
@ -255,54 +255,6 @@ let
|
|||
fi
|
||||
fi
|
||||
|
||||
##########################################################################
|
||||
# Quality Definitions — floor 1080p sources at 10 MB/min (~1.3 Mbps)
|
||||
# so sub-bitrate releases (e.g. 163 MiB 40-min garbage) get rejected.
|
||||
##########################################################################
|
||||
set_quality_floor() {
|
||||
local base="$1" key="$2" title="$3" min_size="$4"
|
||||
local current
|
||||
current=$(curl -sf -H "X-Api-Key: $key" "$base/api/v3/qualitydefinition" \
|
||||
| jq --arg t "$title" '.[] | select(.title == $t)')
|
||||
if [ -z "$current" ]; then
|
||||
echo " $title: not found, skipping"
|
||||
return 0
|
||||
fi
|
||||
local cur_min
|
||||
cur_min=$(echo "$current" | jq -r '.minSize')
|
||||
if awk -v a="$cur_min" -v b="$min_size" 'BEGIN{exit !(a==b)}'; then
|
||||
echo " $title: already at min=$min_size"
|
||||
return 0
|
||||
fi
|
||||
local id updated
|
||||
id=$(echo "$current" | jq -r '.id')
|
||||
updated=$(echo "$current" | jq --argjson min "$min_size" '.minSize = $min')
|
||||
curl -sf -X PUT \
|
||||
-H "Content-Type: application/json" \
|
||||
-H "X-Api-Key: $key" \
|
||||
"$base/api/v3/qualitydefinition/$id" \
|
||||
-d "$updated" > /dev/null \
|
||||
&& echo " $title: min=$cur_min → $min_size" \
|
||||
|| echo " $title: update failed"
|
||||
}
|
||||
|
||||
QUALITY_FLOOR=10
|
||||
QUALITY_TITLES=("HDTV-1080p" "WEBDL-1080p" "WEBRip-1080p" "Bluray-1080p")
|
||||
|
||||
if [ -n "$SONARR_KEY" ]; then
|
||||
echo "Setting Sonarr 1080p quality floors..."
|
||||
for title in "''${QUALITY_TITLES[@]}"; do
|
||||
set_quality_floor "$BASE:8989" "$SONARR_KEY" "$title" "$QUALITY_FLOOR"
|
||||
done
|
||||
fi
|
||||
|
||||
if [ -n "$RADARR_KEY" ]; then
|
||||
echo "Setting Radarr 1080p quality floors..."
|
||||
for title in "''${QUALITY_TITLES[@]}"; do
|
||||
set_quality_floor "$BASE:7878" "$RADARR_KEY" "$title" "$QUALITY_FLOOR"
|
||||
done
|
||||
fi
|
||||
|
||||
##########################################################################
|
||||
# Prowlarr auth — trust localhost so Authelia is the only gate. Other
|
||||
# *arr apps default to this; Prowlarr does not.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue