Coder Social home page Coder Social logo

rtorrent-pushover's People

Contributors

rulex avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

vildegard 2600box

rtorrent-pushover's Issues

Update for multi-user systems

put this in your rtorrent.rc

method.insert = cfg.pushover.userkey, private|const|string, (cat,"putyouruserkeyhere")
method.insert = cfg.pushover.apitoken, private|const|string, (cat,"putyourapp_tokenhere") 
method.set_key = event.download.finished,notify_me,"execute=~/to/your/scripts/folder/rtorrent-pushover.sh,$d.get_name=,$cfg.pushover.userkey=,$cfg.pushover.apitoken="

rtorrent-pushover.sh (in your scripts folder of each user, or ln -s )

#!/bin/bash
if [ ! -f ~/torrents/log/.rtorrent-pushover.log ];
then	
	touch ~/torrents/log/.rtorrent-pushover.log
fi 
[ $# -lt 3 ] || echo "too few args. 1=$1, 2=$2, 3=$3" >> ~/torrents/log/.rtorrent-pushover.log || exit
# pushover settings
[ $2 <> "" ] || userkey=$2
[ $3 <> "" ] || apitoken=$3

tname=$1
ts=$(date +%s)

# notify-send
if [[ -x $( which notify-send ) ]]; then
    notify-send -t 60000 -a rtorrent "${tname}"
fi

# also notify tmux
if [[ -x $( which tmux ) ]]; then
    tmux display-message "Torrent: ${tname}"
fi

# pushover
curly=$(curl https://api.pushover.net/1/messages.json -d "token=${apitoken}&user=${userkey}&title=Torrent&message=${tname}&timestamp=${ts}")
echo ${ts} ${tname} ${curly} >> ~/torrents/log/.rtorrent-pushover.log

Correction

Hi,

Just wanted to correct the amendment on .rtorrent which is supposed to be:

system.method.set_key = event.download.finished,notificationscript,"execute=bash,home/user/rtorrent-pushover.sh,$d.get_name="

notificationscript should be there instead of notify_me.

Now it's working perfectly.
Thanks.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.