From 16ac4407e28273b8cf81d1d10260ece2821f5ddc Mon Sep 17 00:00:00 2001 From: Sam Heinz Date: Wed, 13 May 2026 00:45:53 +1000 Subject: [PATCH] Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --- misc/tools.func | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/misc/tools.func b/misc/tools.func index 887db4671..7c30afda8 100644 --- a/misc/tools.func +++ b/misc/tools.func @@ -4076,9 +4076,14 @@ function setup_ffmpeg() { # If no source download (either VERSION empty or download failed), use binary if [[ -z "$VERSION" ]]; then msg_info "Setup FFmpeg from pre-built binary" - local ffmpeg_arch - case "$(dpkg --print-architecture 2>/dev/null || echo amd64)" in - arm64) ffmpeg_arch="arm64" ;; + local ffmpeg_arch detected_arch + detected_arch="$(dpkg --print-architecture 2>/dev/null || true)" + if [[ -z "$detected_arch" ]]; then + detected_arch="$(uname -m 2>/dev/null || true)" + fi + case "$detected_arch" in + arm64 | aarch64) ffmpeg_arch="arm64" ;; + amd64 | x86_64) ffmpeg_arch="amd64" ;; *) ffmpeg_arch="amd64" ;; esac if ! CURL_TIMEOUT=300 curl_with_retry "https://johnvansickle.com/ffmpeg/releases/ffmpeg-release-${ffmpeg_arch}-static.tar.xz" "$TMP_DIR/ffmpeg.tar.xz"; then