mediaserver: fix bazarr config path (YAML, not INI)
Bazarr stores its config at /var/lib/bazarr/config/config.yaml, not the old /var/lib/bazarr/data/config/config.ini path. Use yq to extract auth.apikey from the YAML. Fixes both bazarr-sync and arr-interconnect. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
d83db8c555
commit
39d5a95866
2 changed files with 5 additions and 5 deletions
|
|
@ -18,8 +18,8 @@ let
|
||||||
PROWLARR_KEY=$(extract_arr_key "/var/lib/prowlarr/config.xml")
|
PROWLARR_KEY=$(extract_arr_key "/var/lib/prowlarr/config.xml")
|
||||||
|
|
||||||
BAZARR_KEY=""
|
BAZARR_KEY=""
|
||||||
if [ -f "/var/lib/bazarr/data/config/config.ini" ]; then
|
if [ -f "/var/lib/bazarr/config/config.yaml" ]; then
|
||||||
BAZARR_KEY=$(grep -oP '(?<=apikey = ).*' /var/lib/bazarr/data/config/config.ini || true)
|
BAZARR_KEY=$(${pkgs.yq-go}/bin/yq '.auth.apikey' /var/lib/bazarr/config/config.yaml || true)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# SAB writes its api_key into [misc] of sabnzbd.ini on first run; until
|
# SAB writes its api_key into [misc] of sabnzbd.ini on first run; until
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@
|
||||||
# so it can reach Bazarr on localhost:6767.
|
# so it can reach Bazarr on localhost:6767.
|
||||||
{ config, lib, pkgs, ... }:
|
{ config, lib, pkgs, ... }:
|
||||||
let
|
let
|
||||||
deps = lib.makeBinPath [ pkgs.curl pkgs.jq pkgs.gnused pkgs.gnugrep pkgs.coreutils pkgs.podman ];
|
deps = lib.makeBinPath [ pkgs.curl pkgs.jq pkgs.gnused pkgs.gnugrep pkgs.coreutils pkgs.podman pkgs.yq-go ];
|
||||||
|
|
||||||
# Shared preamble: extract API keys and write config.yaml
|
# Shared preamble: extract API keys and write config.yaml
|
||||||
preamble = ''
|
preamble = ''
|
||||||
|
|
@ -31,8 +31,8 @@ let
|
||||||
RADARR_KEY=$(extract_arr_key "/var/lib/radarr/config.xml")
|
RADARR_KEY=$(extract_arr_key "/var/lib/radarr/config.xml")
|
||||||
|
|
||||||
BAZARR_KEY=""
|
BAZARR_KEY=""
|
||||||
if [ -f "/var/lib/bazarr/data/config/config.ini" ]; then
|
if [ -f "/var/lib/bazarr/config/config.yaml" ]; then
|
||||||
BAZARR_KEY=$(grep -oP '(?<=apikey = ).*' /var/lib/bazarr/data/config/config.ini || true)
|
BAZARR_KEY=$(yq '.auth.apikey' /var/lib/bazarr/config/config.yaml || true)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -z "$BAZARR_KEY" ]; then
|
if [ -z "$BAZARR_KEY" ]; then
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue