Search found 66 matches

by CSB
Thu Jun 30, 2011 8:08 pm
Forum: Plugins
Topic: How to see time it took to download a torrent?
Replies: 16
Views: 10275

Re: How to see time it took to download a torrent?

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.
by CSB
Thu Jun 30, 2011 4:31 am
Forum: Plugins
Topic: How to see time it took to download a torrent?
Replies: 16
Views: 10275

Re: How to see time it took to download a torrent?

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.
by CSB
Thu Jun 30, 2011 3:17 am
Forum: Plugins
Topic: How to see time it took to download a torrent?
Replies: 16
Views: 10275

Re: How to see time it took to download a torrent?

What does

Code: Select all

/usr/bin/python2 /home/bobby/scripts/deluge/torrentTimeDelta.py 5a2a695ecbbd159570d22a263cc829108fe775d3
return?
by CSB
Thu Jun 30, 2011 1:45 am
Forum: Plugins
Topic: How to see time it took to download a torrent?
Replies: 16
Views: 10275

Re: How to see time it took to download a torrent?

Try calling the python script from the bash script using the same binary you did there.
by CSB
Thu Jun 30, 2011 12:50 am
Forum: Plugins
Topic: How to see time it took to download a torrent?
Replies: 16
Views: 10275

Re: How to see time it took to download a torrent?

Get a torrentid, and try calling the script manually. The following will print all torrent ids. #!/usr/bin/python from deluge.ui.client import client from twisted.internet import reactor d = client.connect() def on_connect_success(result): print "Connection was successful!" def on_get_torr...
by CSB
Wed Jun 29, 2011 9:39 pm
Forum: Plugins
Topic: How to see time it took to download a torrent?
Replies: 16
Views: 10275

Re: How to see time it took to download a torrent?

No.

Save that text as a torrentTimeDelta.py file, chmod +x it, and put it in your PATH.

In your script add

Code: Select all

torrenttimedelta=`python torrentTimeDelta.py $1`
Then, you can use $torrenttimedelta where you want the time.
by CSB
Wed Jun 29, 2011 6:58 am
Forum: Plugins
Topic: How to see time it took to download a torrent?
Replies: 16
Views: 10275

Re: How to see time it took to download a torrent?

colbert wrote:Thanks! How should I call it from my script?
Just pass it $1 and it will return a string.
by CSB
Tue Jun 28, 2011 10:46 pm
Forum: Plugins
Topic: How to see time it took to download a torrent?
Replies: 16
Views: 10275

Re: How to see time it took to download a torrent?

#!/usr/bin/python import sys from datetime import datetime, date, time from deluge.ui.client import client from twisted.internet import reactor d = client.connect() def on_connect_success(result): def on_get_torrent_value(torrent): print str(datetime.fromtimestamp(torrent["active_time"]) ...
by CSB
Sun Apr 17, 2011 4:48 pm
Forum: Development
Topic: Improve auto add from folder with a warning! (SOLVED)
Replies: 9
Views: 9804

Re: Improve auto add from folder with a warning! (SOLVED)

It'd probably have to be modified for Windows, due to the changes of paths and whatnot.

Come to think of it, parsing uTorrent's .dat file would probably be simpler, but I've never seen one, though I have experience with Deluge's API, so that route is what came to me first.
by CSB
Sun Apr 17, 2011 1:00 am
Forum: Development
Topic: Improve auto add from folder with a warning! (SOLVED)
Replies: 9
Views: 9804

Re: Improve auto add from folder with a warning! (SOLVED)

Glad to see the script was able to help you. When saw your first post, I came up with the idea of the script and had to whip it out, since I thought it was a neat idea, but was bummed after I didn't see any replies =/