diff options
Diffstat (limited to 'bundles/bitfroest/files/qbapi')
| -rwxr-xr-x | bundles/bitfroest/files/qbapi | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/bundles/bitfroest/files/qbapi b/bundles/bitfroest/files/qbapi index 89d328e..bed63ba 100755 --- a/bundles/bitfroest/files/qbapi +++ b/bundles/bitfroest/files/qbapi @@ -1,7 +1,8 @@ #!/bin/sh +[ -n "$DEBUG" ] && set -x set -eu -qb_host=https://porphyrion.feralhosting.com/kum4/qbittorrent +qb_host=https://poseidon.feralhosting.com/kum4/qbittorrent qb_user=kum4 qb_pass=${repo.vault.cmd("rbw get 6e66abae-094c-4c98-83ad-9b7bae3eb1b2")} qb_cookiejar=/dev/shm/qb.cookies @@ -17,7 +18,7 @@ do_login() { do_getnew() { curl -sS -b "$qb_cookiejar" \ "$qb_host/api/v2/torrents/info?filter=completed&sort=added_on&tag=" | - jq -rc '.[]|[.name,.content_path]|@tsv' + jq -rc '.[]|[.name,(if .root_path != "" then .root_path else .content_path end)]|@tsv' } do_markx() { @@ -34,7 +35,7 @@ do_markx() { } main() { - test -f "$qb_cookiejar" || do_login + rm -f "$qb_cookiejar" && do_login case "$1" in getnew) do_getnew ;; |