Fix ffprobe not found by Sonarr: symlink system ffprobe to /app/sonarr/bin/

Sonarr v4 configures FFMpegCore to look for ffprobe exclusively in its own
binary directory (/app/sonarr/bin/) via AppDomain.CurrentDomain.BaseDirectory.
The addon already installs ffmpeg via apt (providing /usr/bin/ffprobe), but
Sonarr never looks there. This init script creates a symlink so Sonarr can
find the system-installed ffprobe.

Fixes #2451

Co-authored-by: alexbelgium <44178713+alexbelgium@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2026-02-25 15:09:13 +00:00
parent 1d21c8b172
commit 8c149a55d7

View File

@@ -0,0 +1,12 @@
#!/usr/bin/with-contenv bashio
# shellcheck shell=bash
set -e
# Sonarr v4 looks for ffprobe in its own binary directory (/app/sonarr/bin/)
# via GlobalFFOptions.Configure(options => options.BinaryFolder = AppDomain.CurrentDomain.BaseDirectory)
# Symlink the system-installed ffprobe there so Sonarr can find a working copy
if [ -f /usr/bin/ffprobe ] && [ -d /app/sonarr/bin ]; then
ln -sf /usr/bin/ffprobe /app/sonarr/bin/ffprobe
echo "Symlinked /usr/bin/ffprobe to /app/sonarr/bin/ffprobe"
fi