summaryrefslogtreecommitdiffstats
path: root/lass
diff options
context:
space:
mode:
authorlassulus <git@lassul.us>2023-09-04 13:50:44 +0200
committerlassulus <git@lassul.us>2023-09-04 13:50:44 +0200
commit820e17ca1b7ab863ae69d18f56c042112385ca08 (patch)
tree3a84a6c95e0be9c91daa8f5d7eb8d75abaff2e4e /lass
parente8821a74cc8a37065400df63ba3493216034c44c (diff)
l: init dls
Diffstat (limited to 'lass')
-rw-r--r--lass/5pkgs/dls/default.nix13
1 files changed, 13 insertions, 0 deletions
diff --git a/lass/5pkgs/dls/default.nix b/lass/5pkgs/dls/default.nix
new file mode 100644
index 000000000..36cdb620b
--- /dev/null
+++ b/lass/5pkgs/dls/default.nix
@@ -0,0 +1,13 @@
+{ pkgs }:
+pkgs.writers.writeDashBin "dls" ''
+ set -efux
+ SESSION_ID=$(
+ curl -Ss -d '{}' http://yellow.r:9091/transmission/rpc -v -o /dev/null 2>&1 |
+ grep -oP '(?<=X-Transmission-Session-Id: )\w+'
+ )
+ ${pkgs.curl}/bin/curl -Ss \
+ http://yellow.r:9091/transmission/rpc \
+ -H "X-Transmission-Session-Id: $SESSION_ID" \
+ -d '{"arguments":{"fields":["errorString","eta","isFinished","name","sizeWhenDone","status"]},"method":"torrent-get","tag":4}' |
+ jq .
+''