diff --git a/bin/qbth b/bin/qbth index c0e59be..690770b 100755 --- a/bin/qbth +++ b/bin/qbth @@ -19,7 +19,7 @@ fi function add_torrents() { torrents=("$@") - if ! parallel qbt torrent add url ::: "${torrents[@]}"; then + if ! parallel qbt torrent add url --category "distro" ::: "${torrents[@]}"; then gum log -l error "Error adding torrents" exit 1 fi @@ -110,6 +110,7 @@ case "$distro_selection" in ;; "Delete") + # TODO: Fix this. I suspect it has to do with the $relver not expanding in the jq input. torrent_hashes=$(qbt torrent list -F json | jq '.[] | select(.name | startswith("Fedora") and endswith("$relver")) | .hash' | tr -d '"') delete_torrents "$torrent_hashes" ;; diff --git a/justfile b/justfile index 899acca..ef093eb 100644 --- a/justfile +++ b/justfile @@ -114,6 +114,6 @@ qbittorrent-enable: scihub-setup: mkdir ~/scihub-torrent-urls - lynx -dump -nonumbers -listonly=on https://libgen.rs/repository_torrent/ | grep "\.torrent" | tee scihub-torrent-urls/urls.txt - cd scihub-torrent-urls && split -l 60 urls.txt torrent- - rm -fv scihub-torrent-urls/urls.txt + lynx -dump -nonumbers -listonly=on https://libgen.rs/repository_torrent/ | grep "\.torrent" | tee ~/scihub-torrent-urls/urls.txt + cd ~/scihub-torrent-urls && split -l 60 ~/scihub-torrent-urls/urls.txt torrent- + rm -fv ~/scihub-torrent-urls/urls.txt