diff options
author | Xiao Pan <xyz@flylightning.xyz> | 2025-07-13 22:04:44 +0800 |
---|---|---|
committer | Xiao Pan <xyz@flylightning.xyz> | 2025-07-13 22:04:44 +0800 |
commit | c5acab5e90628a7cf5fc02a69135a7539fc1970b (patch) | |
tree | 7853bb75127a8f579edfd0344275e4b0478ef6a3 | |
parent | 1877a9b42fb68a1d0bad6558d4327f278e9fb5fb (diff) |
upd: clean code about studio
-rwxr-xr-x | sh/upd | 14 |
1 files changed, 6 insertions, 8 deletions
@@ -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 |