summaryrefslogtreecommitdiffstats
path: root/skripti
diff options
context:
space:
mode:
Diffstat (limited to 'skripti')
-rw-r--r--skripti/IntsToBytes.java14
-rwxr-xr-xskripti/prowlarr_enable_all_indexers.sh6
2 files changed, 20 insertions, 0 deletions
diff --git a/skripti/IntsToBytes.java b/skripti/IntsToBytes.java
new file mode 100644
index 0000000..bd701e0
--- /dev/null
+++ b/skripti/IntsToBytes.java
@@ -0,0 +1,14 @@
+import java.util.*;
+public class IntsToBytes {
+ public static void main (String[] args) {
+ Scanner sc = new Scanner(System.in);
+ while (true) {
+ try {
+ System.out.write(sc.nextInt());
+ } catch (NoSuchElementException e) {
+ System.out.flush();
+ System.exit(0);
+ }
+ }
+ }
+}
diff --git a/skripti/prowlarr_enable_all_indexers.sh b/skripti/prowlarr_enable_all_indexers.sh
new file mode 100755
index 0000000..1c6718e
--- /dev/null
+++ b/skripti/prowlarr_enable_all_indexers.sh
@@ -0,0 +1,6 @@
+#!/bin/sh
+set -xeuo pipefail
+curl "$1/api/v1/indexer/schema" -H "X-Api-Key: $2" | jq -c '.[]|select(.privacy=="public")' | while read -r l
+do
+ sed 's/"appProfileId":0,/"appProfileId":1,/' <<<$l | curl -i "$1/api/v1/indexer?" -X POST -H "Content-Type: application/json" -H "X-Api-Key: $2" --data-binary @-
+done