Suggest, post, or discuss plugins for Deluge
colbert
Member
Posts: 10 Joined: Wed Mar 30, 2011 12:50 am
Post
by colbert » Thu Jun 30, 2011 2:49 am
Okay I did this, but it's freezing my deluge now when it executes. Checking PIDs I see:
Code: Select all
psaux deluge
bobby 1599 0.8 0.8 73760 28544 ? Sl Jun28 13:24 /usr/bin/python2 /usr/bin/deluged
bobby 1604 0.3 0.4 22372 16460 ? S Jun28 6:02 /usr/bin/python2 /usr/bin/deluge-web -f
bobby 1809 0.2 0.2 15816 6752 pts/5 Ss+ Jun28 4:24 /usr/bin/python2 /usr/bin/deluge-console
bobby 6174 0.0 0.0 3136 1060 ? S 22:37 0:00 /bin/bash /home/bobby/scripts/deluge/torrent_complete.sh 5a2a695ecbbd159570d22a263cc829108fe775d3 Katy Perry - Teenage Dream.mp3 /media/stuff/torrents
bobby 6175 0.4 0.2 12732 9904 ? S 22:37 0:00 python2 /home/bobby/scripts/deluge/torrentTimeDelta.py 5a2a695ecbbd159570d22a263cc829108fe775d3
bobby 6582 0.0 0.0 3948 856 pts/12 S+ 22:38 0:00 grep -i --color=auto deluge
bobby 10897 0.0 0.5 217508 16864 pts/9 Sl+ 18:32 0:08 gedit deluge/torrent_complete.sh deluge/torrent_complete.sh~ deluge/torrent_time.sh
I kill the script (5th line down above) and deluge resumes as normal
To be clear I'm running this in the script:
Code: Select all
torrenttimedelta=`/usr/bin/python2 /home/bobby/scripts/deluge/torrentTimeDelta.py $1`
And in the torrentTimeDelta.py script my shebang is
CSB
Leecher
Posts: 66 Joined: Fri Dec 03, 2010 1:55 am
Post
by CSB » Thu Jun 30, 2011 3:17 am
What does
Code: Select all
/usr/bin/python2 /home/bobby/scripts/deluge/torrentTimeDelta.py 5a2a695ecbbd159570d22a263cc829108fe775d3
return?
colbert
Member
Posts: 10 Joined: Wed Mar 30, 2011 12:50 am
Post
by colbert » Thu Jun 30, 2011 3:29 am
I used other torrent ID as that one was just for testing script and I deleted it:
Code: Select all
/usr/bin/python2 /home/bobby/scripts/deluge/torrentTimeDelta.py 6885686de45f284ac2a44f021dbf9584cac24d1e
65 days, 16:08:33
CSB
Leecher
Posts: 66 Joined: Fri Dec 03, 2010 1:55 am
Post
by CSB » Thu Jun 30, 2011 4:31 am
Code: Select all
#!/bin/bash
torrentid=$1
torrenttimedelta=`/usr/bin/python2 /home/bobby/scripts/deluge/torrentTimeDelta.py $1`
echo -e `echo -e "$torrenttimedelta"`
What happens when you pass that script an id?
Make sure you're doing all of your testing from the account that deluge is running from.
colbert
Member
Posts: 10 Joined: Wed Mar 30, 2011 12:50 am
Post
by colbert » Thu Jun 30, 2011 5:48 pm
Saved that as torrenttest.sh and chmod+x, it works:
Code: Select all
./torrenttest.sh 7ff6f0ca13415686703fe7b8d18203f95805f2b4
0:12:14
CSB
Leecher
Posts: 66 Joined: Fri Dec 03, 2010 1:55 am
Post
by CSB » Thu Jun 30, 2011 8:08 pm
colbert wrote: Saved that as torrenttest.sh and chmod+x, it works:
Code: Select all
./torrenttest.sh 7ff6f0ca13415686703fe7b8d18203f95805f2b4
0:12:14
I'm no bash expert, but your script should be working from what I can tell.
colbert
Member
Posts: 10 Joined: Wed Mar 30, 2011 12:50 am
Post
by colbert » Fri Jul 01, 2011 5:05 am
I think it is related to Python issues my distro has had with updates. Thanks a ton for your help, greatly appreciated. I'm going to try on distro forum and report back here if any luck