summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew <saintruler@gmail.com>2021-01-19 01:18:53 +0400
committerAndrew <saintruler@gmail.com>2021-01-19 01:18:53 +0400
commit22a7482fd165d16a444034df12124dd830ea5d52 (patch)
tree8e787324bbc3405dbea2b02218bfb4189f0abf1b
parentfc45b2f7462ae9d4af2b6d71c0bdcbeebdeeabae (diff)
Changed transadd script to work with remote server
-rwxr-xr-x.local/bin/scripts/transadd20
1 files changed, 13 insertions, 7 deletions
diff --git a/.local/bin/scripts/transadd b/.local/bin/scripts/transadd
index e73194c..cbe7ba4 100755
--- a/.local/bin/scripts/transadd
+++ b/.local/bin/scripts/transadd
@@ -1,11 +1,17 @@
#!/bin/sh
-directories="/home/andrew/Downloads
-/home/andrew/Videos/Movies
-/home/andrew/Videos/Series"
+# Local paths
+# directories="/home/andrew/Downloads
+# /home/andrew/Videos/Movies
+# /home/andrew/Videos/Series"
+
+# Paths on remote server
+directories="/var/lib/transmission-daemon/downloads/Movies
+/var/lib/transmission-daemon/downloads/Series"
+
+host=$(pass transmission/rpi-host)
+creds=$(pass transmission/rpi-creds)
+
dest=$(printf "$directories" | dmenu -p "Choose destination" -i -l 5)
-transmission-remote -a "$@" -w "$dest" && notify-send "Torrent added"
+transmission-remote $host -n $creds -a "$@" -w "$dest" && notify-send "Torrent added"
-#tname=$(transmission-show "$@" | grep "^Name: " | sed "s/Name: //g")
-#tid=$(transmission-remote -l | grep "$tname" | awk '{ print $1 }')
-#t