From 4c2e40a46b7179a88f70e2ff37c6b5d46ab1f3d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Padez?= Date: Wed, 4 Mar 2026 20:13:51 +0000 Subject: [PATCH] install yt-dlp via pip instead of apt for latest version Co-Authored-By: Claude Opus 4.6 --- scripts/setup.sh | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/scripts/setup.sh b/scripts/setup.sh index 27a7df31..955cd265 100755 --- a/scripts/setup.sh +++ b/scripts/setup.sh @@ -638,11 +638,24 @@ fi echo "" echo "── yt-dlp (optional) ──" -if has yt-dlp; then - skip "yt-dlp" +# Always install/upgrade via pip to get the latest version (apt repos are outdated). +# Remove apt version first if present, then install via pip to /usr/local/bin. +if has pip3; then + # Remove outdated apt version if installed + case $PM in + apt) + if dpkg -s yt-dlp &>/dev/null 2>&1; then + echo " Removing outdated apt version..." + sudo apt remove -y yt-dlp > /dev/null 2>&1 + fi + ;; + esac + echo " Installing/upgrading yt-dlp via pip..." + sudo pip3 install --break-system-packages --upgrade yt-dlp 2>/dev/null + if has yt-dlp; then ok "yt-dlp $(yt-dlp --version) installed"; else warn "yt-dlp pip install failed"; fi else case $PM in - apt) install_pkg yt-dlp 2>/dev/null && ok "yt-dlp installed" || warn "yt-dlp not in apt repos — install via pip or GitHub" ;; + apt) install_pkg yt-dlp 2>/dev/null && ok "yt-dlp installed (apt — may be outdated)" || warn "yt-dlp not available" ;; pacman) install_pkg yt-dlp && ok "yt-dlp installed" ;; brew) install_pkg yt-dlp && ok "yt-dlp installed" ;; esac