Execute Plugin - How to transfer deluge variables from one bash script to another?

Suggest, post, or discuss plugins for Deluge
Post Reply
almanteka
New User
New User
Posts: 2
Joined: Wed Aug 15, 2018 9:37 pm

Execute Plugin - How to transfer deluge variables from one bash script to another?

Post by almanteka »

hi! love deluge and the plugins! GREAT work! i like to know how to transfer deluge variables

torrentid=$1
torrentname=$2
torrentpath=$3

from this script:

Code: Select all

#!/bin/bash
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
PATH="/snap/bin:$PATH"
export DISPLAY=:0

torrentid=$1
torrentname=$2
torrentpath=$3

if [[ $torrentpath == "/media/storage/Downloads/TVToProcess" ]] ; then
     bash /home/pixelburst/bin/tv.sh
     bash /home/pixelburst/bin/notification.sh $@
elif [[ $torrentpath == "/media/storage/Downloads/AnimeToProcess" ]] ; then
     bash /home/pixelburst/bin/anime.sh
     bash /home/pixelburst/bin/notification.sh $@
elif [[ $torrentpath == "/media/storage/Downloads/MoviesToProcess" ]] ; then
     bash /home/pixelburst/bin/movies.sh
     bash /home/pixelburst/bin/notification.sh $@
else
    :
fi
to this one? this one is fired by the first (notification.sh):

Code: Select all

#!/bin/bash

torrentid=$1
torrentname=$2
torrentpath=$3

curl -v -k -X POST \
--data-urlencode 'payload={"text":":white_check_mark: *Deluge - File Completed!* \n'$torrentname' \nFile download completed! \n---------------------------------"}' \
"link to notification service"
all the scripts are working, just this one fail to deliver the notification with the torrent name included!
thanks in advance for all your help!
almanteka
New User
New User
Posts: 2
Joined: Wed Aug 15, 2018 9:37 pm

Re: Execute Plugin - How to transfer deluge variables from one bash script to another?

Post by almanteka »

the second script started to work correctly after one hour! just added $@ to "bash /home/pixelburst/bin/notification.sh" line!

Code: Select all

bash /home/pixelburst/bin/notification.sh $@
hope that's it! thanks!
Post Reply