From 22a7482fd165d16a444034df12124dd830ea5d52 Mon Sep 17 00:00:00 2001 From: Andrew Date: Tue, 19 Jan 2021 01:18:53 +0400 Subject: Changed transadd script to work with remote server --- .local/bin/scripts/transadd | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) (limited to '.local') 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 -- cgit v1.2.3