1
0
Fork 0
mirror of https://github.com/iiab/iiab.git synced 2025-02-15 04:32:11 +00:00

Merge pull request #3862 from deldesir/deldesir-patch-5

Check if older version of 'library' (xklb) is installed
This commit is contained in:
A Holt 2024-12-16 21:40:34 -05:00 committed by GitHub
commit 9db5dbe3a4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 20 additions and 10 deletions

View file

@ -99,9 +99,15 @@
if [ -f {{ calibreweb_venv_path }}/scripts/lb-wrapper ]; then if [ -f {{ calibreweb_venv_path }}/scripts/lb-wrapper ]; then
apt install ffmpeg pipx -y apt install ffmpeg pipx -y
if lb --version; then if lb --version; then
if pipx list | grep -q 'xklb'; then
pipx uninstall xklb
pipx install library
else
pipx reinstall library pipx reinstall library
fi
else else
pipx install library pipx install library
fi
ln -sf /root/.local/bin/lb /usr/local/bin/lb ln -sf /root/.local/bin/lb /usr/local/bin/lb
if [ -f /root/.local/share/pipx/venvs/library/bin/yt-dlp ]; then if [ -f /root/.local/share/pipx/venvs/library/bin/yt-dlp ]; then
ln -sf /root/.local/share/pipx/venvs/library/bin/yt-dlp /usr/local/bin/yt-dlp ln -sf /root/.local/share/pipx/venvs/library/bin/yt-dlp /usr/local/bin/yt-dlp
@ -110,7 +116,6 @@
else else
echo "ERROR: yt-dlp NOT FOUND" echo "ERROR: yt-dlp NOT FOUND"
fi fi
fi
# NEED BETTER/EXPERIMENTAL YouTube SCRAPING? UNCOMMENT THE NEXT LINE -- for the latest yt-dlp "nightly" release: # NEED BETTER/EXPERIMENTAL YouTube SCRAPING? UNCOMMENT THE NEXT LINE -- for the latest yt-dlp "nightly" release:
# pipx inject --pip-args="--upgrade --pre" -f library yt-dlp[default] # pipx inject --pip-args="--upgrade --pre" -f library yt-dlp[default]
# #

View file

@ -58,8 +58,13 @@
if grep -q 'calibreweb_installed: True' /etc/iiab/iiab_state.yml; then if grep -q 'calibreweb_installed: True' /etc/iiab/iiab_state.yml; then
if [[ $1 == "-f" || $1 == "--fast" ]]; then if [[ $1 == "-f" || $1 == "--fast" ]]; then
echo -e "\e[4mChecking if an older version of 'library' (formerly 'xklb') exists...\e[0m"
if pipx list | grep -q 'xklb'; then
echo -e "\e[4mOlder version 'xklb' detected. Now running: pipx uninstall xklb\e[0m"
pipx uninstall xklb
fi
echo -e "\e[4mNow running: pipx uninstall library # THIS ALSO UNINSTALLS yt-dlp\e[0m\n" echo -e "\e[4mNow running: pipx uninstall library # THIS ALSO UNINSTALLS yt-dlp\e[0m\n"
pipx uninstall library pipx uninstall library || true
echo -e "\n\e[4mNow running: pipx install library # THIS ALSO INSTALLS yt-dlp\e[0m\n" echo -e "\n\e[4mNow running: pipx install library # THIS ALSO INSTALLS yt-dlp\e[0m\n"
pipx install library pipx install library
echo -e "\n\e[4mNow running: yt-dlp --version\e[0m\n" echo -e "\n\e[4mNow running: yt-dlp --version\e[0m\n"