arr-interconnect: propers/repacks doNotPrefer
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
d3ce8f66fc
commit
78a7f1b478
1 changed files with 27 additions and 0 deletions
|
|
@ -141,6 +141,33 @@ let
|
|||
reconcile_root_folders "Radarr" 7878 "$RADARR_KEY" '${builtins.toJSON rootFolders.radarr}'
|
||||
reconcile_root_folders "Sonarr" 8989 "$SONARR_KEY" '${builtins.toJSON rootFolders.sonarr}'
|
||||
|
||||
##########################################################################
|
||||
# Propers/repacks — doNotPrefer, as Dictionarry's media_management/misc.yml
|
||||
# intends (Profilarr never synced it). The default preferAndUpgrade grabs
|
||||
# any REPACK/PROPER over a same-quality file while ignoring CF score, then
|
||||
# import rejects it ("Not a Custom Format upgrade") and it rots in the
|
||||
# queue. The profiles' Repack1-3 CFs already score repacks properly.
|
||||
##########################################################################
|
||||
set_propers_no_prefer() {
|
||||
local name="$1" port="$2" key="$3" mm
|
||||
|
||||
[ -n "$key" ] || return 0
|
||||
mm=$(curl -sf -H "X-Api-Key: $key" "$BASE:$port/api/v3/config/mediamanagement" || true)
|
||||
[ -n "$mm" ] || return 0
|
||||
if [ "$(echo "$mm" | jq -r .downloadPropersAndRepacks)" != "doNotPrefer" ]; then
|
||||
echo "Setting $name propers/repacks to doNotPrefer"
|
||||
curl -sf -X PUT \
|
||||
-H "Content-Type: application/json" \
|
||||
-H "X-Api-Key: $key" \
|
||||
"$BASE:$port/api/v3/config/mediamanagement" \
|
||||
-d "$(echo "$mm" | jq '.downloadPropersAndRepacks = "doNotPrefer"')" > /dev/null \
|
||||
&& echo " done" || echo " failed"
|
||||
fi
|
||||
}
|
||||
|
||||
set_propers_no_prefer "Radarr" 7878 "$RADARR_KEY"
|
||||
set_propers_no_prefer "Sonarr" 8989 "$SONARR_KEY"
|
||||
|
||||
##########################################################################
|
||||
# Prowlarr → Sonarr (push indexers for TV)
|
||||
##########################################################################
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue