From 9dde4d9c9b4b807b03de59a6fa22ccaf98508c1c Mon Sep 17 00:00:00 2001 From: Tigor Hutasuhut Date: Mon, 9 Sep 2024 22:14:59 +0700 Subject: [PATCH] qbittorrent: update notify script --- system/podman/qbittorrent.nix | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/system/podman/qbittorrent.nix b/system/podman/qbittorrent.nix index 4677e00..59f8c9c 100644 --- a/system/podman/qbittorrent.nix +++ b/system/podman/qbittorrent.nix @@ -57,11 +57,12 @@ in # $11 = %J | Info Hash v2 # $12 = %K | Torrent ID + size=$(echo $8 | numfmt --to=iec) curl -X POST \ -H "Authorization: Bearer $NTFY_TOKEN" \ -H "X-Title: $1" \ -H "X-Tags: white_check_mark,$2" \ - -d "Number of Files: $7, Size: $8" \ + -d "Number of Files: $7, Size: $size" \ https://ntfy.tigor.web.id/qbittorrent ''); start-notify-script = pkgs.writeScriptBin "notify-start.sh" (optionalString config.services.ntfy-sh.enable /*sh*/ '' @@ -70,7 +71,7 @@ in -H "Authorization: Bearer $NTFY_TOKEN" \ -H "X-Title: $1" \ -H "X-Tags: rocket,$2" \ - -d "Number of Files: $7, Size: $8" \ + -d "Starts downloading" \ https://ntfy.tigor.web.id/qbittorrent ''); in