Compare commits

..

1 Commits

Author SHA1 Message Date
MickLesk
354895e0e8 fix(isponsorblocktv): detect CPU capabilities to select compatible binary
Instead of hard-failing when AVX is not present, detect whether the host
CPU supports AVX + AVX2 + MOVBE (x86-64-v3 microarchitecture level) and
select the appropriate upstream binary accordingly:

- iSponsorBlockTV-x86_64-linux     → modern CPUs (AVX/AVX2/MOVBE)
- iSponsorBlockTV-x86_64-linux-v1  → any x86_64 CPU (fallback)

The same detection logic is applied in update_script() so updates
stay consistent with the initially installed binary type.

Fixes: https://github.com/community-scripts/ProxmoxVE/issues/14660
Upstream: dmunozv04/iSponsorBlockTV#463
2026-05-23 22:49:31 +02:00
3 changed files with 18 additions and 8 deletions

View File

@@ -36,7 +36,11 @@ function update_script() {
systemctl stop isponsorblocktv systemctl stop isponsorblocktv
msg_ok "Stopped Service" msg_ok "Stopped Service"
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "isponsorblocktv" "dmunozv04/iSponsorBlockTV" "singlefile" "latest" "/opt/isponsorblocktv" "iSponsorBlockTV-x86_64-linux" ISBTV_BINARY="iSponsorBlockTV-x86_64-linux-v1"
if grep -q ' avx ' /proc/cpuinfo 2>/dev/null && grep -q ' avx2 ' /proc/cpuinfo 2>/dev/null && grep -q ' movbe ' /proc/cpuinfo 2>/dev/null; then
ISBTV_BINARY="iSponsorBlockTV-x86_64-linux"
fi
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "isponsorblocktv" "dmunozv04/iSponsorBlockTV" "singlefile" "latest" "/opt/isponsorblocktv" "${ISBTV_BINARY}"
msg_info "Starting Service" msg_info "Starting Service"
systemctl start isponsorblocktv systemctl start isponsorblocktv

View File

@@ -13,12 +13,12 @@ setting_up_container
network_check network_check
update_os update_os
if ! grep -q ' avx ' /proc/cpuinfo 2>/dev/null; then ISBTV_BINARY="iSponsorBlockTV-x86_64-linux-v1"
msg_error "CPU does not support AVX instructions (required by iSponsorBlockTV/PyApp)" if grep -q ' avx ' /proc/cpuinfo 2>/dev/null && grep -q ' avx2 ' /proc/cpuinfo 2>/dev/null && grep -q ' movbe ' /proc/cpuinfo 2>/dev/null; then
exit 106 ISBTV_BINARY="iSponsorBlockTV-x86_64-linux"
fi fi
fetch_and_deploy_gh_release "isponsorblocktv" "dmunozv04/iSponsorBlockTV" "singlefile" "latest" "/opt/isponsorblocktv" "iSponsorBlockTV-x86_64-linux" fetch_and_deploy_gh_release "isponsorblocktv" "dmunozv04/iSponsorBlockTV" "singlefile" "latest" "/opt/isponsorblocktv" "${ISBTV_BINARY}"
msg_info "Setting up iSponsorBlockTV" msg_info "Setting up iSponsorBlockTV"
install -d /var/lib/isponsorblocktv install -d /var/lib/isponsorblocktv

View File

@@ -47,7 +47,7 @@ function msg_ok() {
function msg_error() { echo -e "${RD}$1${CL}"; } function msg_error() { echo -e "${RD}$1${CL}"; }
# This function checks the version of Proxmox Virtual Environment (PVE) and exits if the version is not supported. # This function checks the version of Proxmox Virtual Environment (PVE) and exits if the version is not supported.
# Supported: Proxmox VE 8.0.x 8.9.x and 9.09.x # Supported: Proxmox VE 8.0.x 8.9.x and 9.09.1.x
pve_check() { pve_check() {
local PVE_VER local PVE_VER
PVE_VER="$(pveversion | awk -F'/' '{print $2}' | awk -F'-' '{print $1}')" PVE_VER="$(pveversion | awk -F'/' '{print $2}' | awk -F'-' '{print $1}')"
@@ -63,14 +63,20 @@ pve_check() {
return 0 return 0
fi fi
# Check for Proxmox VE 9.x: allow 9.09.x # Check for Proxmox VE 9.x: allow 9.09.1.x
if [[ "$PVE_VER" =~ ^9\.([0-9]+) ]]; then if [[ "$PVE_VER" =~ ^9\.([0-9]+) ]]; then
local MINOR="${BASH_REMATCH[1]}"
if ((MINOR < 0 || MINOR > 1)); then
msg_error "This version of Proxmox VE is not yet supported."
msg_error "Supported: Proxmox VE version 9.09.1.x"
exit 105
fi
return 0 return 0
fi fi
# All other unsupported versions # All other unsupported versions
msg_error "This version of Proxmox VE is not supported." msg_error "This version of Proxmox VE is not supported."
msg_error "Supported versions: Proxmox VE 8.0 8.9 or 9.09.x" msg_error "Supported versions: Proxmox VE 8.0 8.9 or 9.09.1.x"
exit 105 exit 105
} }