mirror of
https://codeberg.org/hyperreal/admin-scripts
synced 2024-11-01 16:03:06 +01:00
Add 'distro' category to qbth; fix scihub-setup
This commit is contained in:
parent
f1ff90ec48
commit
f07a37790e
3
bin/qbth
3
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"
|
||||
;;
|
||||
|
6
justfile
6
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
|
||||
|
Loading…
Reference in New Issue
Block a user