diff --git a/anime_scripts/jellyfin-namer-new.sh b/anime_scripts/jellyfin-namer-new.sh index 1c5a098..b9bf71b 100644 --- a/anime_scripts/jellyfin-namer-new.sh +++ b/anime_scripts/jellyfin-namer-new.sh @@ -1,12 +1,21 @@ #!/bin/bash #Check if requests is installed, and if not install it -python -c "import requests" -if [[ "$?" == "1" ]]; then - apt update - apt install python-requests +if [[ -f /tmp/request_install_lock ]]; then + while [[ -f /tmp/requests_install_lock ]]; do + sleep 1 + done +else + python -c "import requests" + if [[ "$?" == "1" ]]; then + echo '' > /tmp/requests_install_lock + apt update + apt install python-requests + rm /tmp/requests_install_lock + fi fi + #Gets the last part of the current directory function get_bottom_dir() { IFS='/';