summaryrefslogtreecommitdiff
path: root/sh
diff options
context:
space:
mode:
authorXiao Pan <xyz@flylightning.xyz>2025-07-13 22:04:44 +0800
committerXiao Pan <xyz@flylightning.xyz>2025-07-13 22:04:44 +0800
commitc5acab5e90628a7cf5fc02a69135a7539fc1970b (patch)
tree7853bb75127a8f579edfd0344275e4b0478ef6a3 /sh
parent1877a9b42fb68a1d0bad6558d4327f278e9fb5fb (diff)
upd: clean code about studio
Diffstat (limited to 'sh')
-rwxr-xr-xsh/upd14
1 files changed, 6 insertions, 8 deletions
diff --git a/sh/upd b/sh/upd
index 4a20aac..32a668e 100755
--- a/sh/upd
+++ b/sh/upd
@@ -304,14 +304,12 @@ monthly_misc () {
# https://github.com/qbittorrent/qBittorrent/wiki#webui-api
curl -sS -X POST 'ibwg:57151/api/v2/search/updatePlugins' &
- # in the past, I have both stwg and ibwg, now only one but I decided to keep the code
- for qbt_wireguard_host in ibwg; do
- # another way: `jq -r '.[]|"\(.added_on)\t\(.hash)\t\(.name)"'`
- curl -sS "$qbt_wireguard_host:57151/api/v2/torrents/info?category=useful" | jq -r '.[]|[.added_on,.hash,.name]|@tsv' | grep 'archlinux.*\.iso' | sort -n | head -n-1 | awk '{print $2}' | while read -r hash; do
- # need POST to delete torrents. -d default POST, so no need `-X POST`
- curl -sS -d "hashes=$hash" -d deleteFiles=true "$qbt_wireguard_host:57151/api/v2/torrents/delete"
- done &
- done
+ # in the past, I have both stwg and ibwg, now only one
+ # another way: `jq -r '.[]|"\(.added_on)\t\(.hash)\t\(.name)"'`
+ curl -sS 'ibwg:57151/api/v2/torrents/info?category=useful' | jq -r '.[]|[.added_on,.hash,.name]|@tsv' | grep 'archlinux.*\.iso' | sort -n | head -n-1 | awk '{print $2}' | while read -r hash; do
+ # need POST to delete torrents. -d default POST, so no need `-X POST`
+ curl -sS -d "hashes=$hash" -d deleteFiles=true 'ibwg:57151/api/v2/torrents/delete'
+ done &
wait
while ! [ -d /run/media/xyz/Ventoy ]; do