Update for new versions of qBittorrent and libtorrent

This commit is contained in:
jerry048 2023-06-16 16:39:37 +08:00
parent ad5f621d1b
commit 4b79e01113
13 changed files with 18 additions and 12 deletions

View File

@ -1,7 +1,7 @@
function qBittorrent_download {
## Allow users to determine which version of qBittorrent to be installed
need_input; echo "Please enter your choice (qBittorrent Version - libtorrent Version):"; normal_3
options=("qBittorrent 4.1.9 - libtorrent-1_1_14" "qBittorrent 4.1.9.1 - libtorrent-1_1_14" "qBittorrent 4.3.8 - libtorrent-v1.2.14" "qBittorrent 4.3.9 - libtorrent-v1.2.18" "qBittorrent 4.4.5 - libtorrent-v1.2.18" "qBittorrent 4.4.5 - libtorrent-v2.0.8" "qBittorrent 4.5.2 - libtorrent-v1.2.18" "qBittorrent 4.5.2 - libtorrent-v2.0.8")
options=("qBittorrent 4.1.9 - libtorrent-1_1_14" "qBittorrent 4.1.9.1 - libtorrent-1_1_14" "qBittorrent 4.3.8 - libtorrent-v1.2.14" "qBittorrent 4.3.9 - libtorrent-v1.2.19" "qBittorrent 4.4.5 - libtorrent-v1.2.19" "qBittorrent 4.4.5 - libtorrent-v2.0.9" "qBittorrent 4.5.3 - libtorrent-v1.2.19" "qBittorrent 4.5.3 - libtorrent-v2.0.9" "qBittorrent 4.6.0alpha1 - libtorrent-v1.2.19" "qBittorrent 4.6.0alpha1 - libtorrent-v2.0.9")
select opt in "${options[@]}"
do
case $opt in
@ -14,20 +14,26 @@ function qBittorrent_download {
"qBittorrent 4.3.8 - libtorrent-v1.2.14")
qBver=4.3.8 && libver=libtorrent-v1.2.14; break
;;
"qBittorrent 4.3.9 - libtorrent-v1.2.18")
qBver=4.3.9 && libver=libtorrent-v1.2.18; break
"qBittorrent 4.3.9 - libtorrent-v1.2.19")
qBver=4.3.9 && libver=libtorrent-v1.2.19; break
;;
"qBittorrent 4.4.5 - libtorrent-v1.2.18")
qBver=4.4.5 && libver=libtorrent-v1.2.18; break
"qBittorrent 4.4.5 - libtorrent-v1.2.19")
qBver=4.4.5 && libver=libtorrent-v1.2.19; break
;;
"qBittorrent 4.4.5 - libtorrent-v2.0.8")
qBver=4.4.5 && libver=libtorrent-v2.0.8; break
"qBittorrent 4.4.5 - libtorrent-v2.0.9")
qBver=4.4.5 && libver=libtorrent-v2.0.9; break
;;
"qBittorrent 4.5.2 - libtorrent-v1.2.18")
qBver=4.5.2 && libver=libtorrent-v1.2.18; break
"qBittorrent 4.5.3 - libtorrent-v1.2.19")
qBver=4.5.3 && libver=libtorrent-v1.2.19; break
;;
"qBittorrent 4.5.2 - libtorrent-v2.0.8")
qBver=4.5.2 && libver=libtorrent-v2.0.8; break
"qBittorrent 4.5.3 - libtorrent-v2.0.9")
qBver=4.5.3 && libver=libtorrent-v2.0.9; break
;;
"qBittorrent 4.6.0alpha1 - libtorrent-v1.2.19")
qBver=4.6.0alpha1 && libver=libtorrent-v1.2.19; break
;;
"qBittorrent 4.6.0alpha1 - libtorrent-v2.0.9")
qBver=4.6.0alpha1 && libver=libtorrent-v2.0.9; break
;;
*) warn_1; echo "Please choose a valid version"; normal_3;;
esac
@ -135,7 +141,7 @@ WebUI\Password_PBKDF2="@ByteArray($PBKDF2password)"
WebUI\Port=8080
WebUI\Username=$username
EOF
elif [[ "${qBver}" =~ "4.4."|"4.5." ]]; then
elif [[ "${qBver}" =~ "4.4."|"4.5."|"4.6." ]]; then
wget https://raw.githubusercontent.com/jerry048/Seedbox-Components/main/Torrent%20Clients/qBittorrent/qb_password_gen && chmod +x $HOME/qb_password_gen
PBKDF2password=$($HOME/qb_password_gen $password)
cat << EOF >/home/$username/.config/qBittorrent/qBittorrent.conf