Archived

This topic is now archived and is closed to further replies.

twistedfall

uTorrent WebUI command line utility and library for Python 3

Recommended Posts

Thanks! Installed Python3 and got it working...

Question? I'm looking for the ability to pull up "statistics" like those shown when you hit help/statistics in the gui client?

Any way of doing this with your tool? web ui doesn't provide this data...

Checked help of course, and didn't see anything, but thought I'd double check.. thanks!

jb

Share this post


Link to post
Share on other sites

btw... tried the -l -s COMPLETED_ON and -l -s ADDED_ON and I'm not seeing any differences.. Tried other sort params as well... always getting the same sort.. I seem to be getting a sort based on what appears to be "description" no matter which param I choose... is the sort function working? or am I missing something?

jb

Share this post


Link to post
Share on other sites

I see, it's case sensitive currently, so you need to use completed_on and added_on in lowercase. All the possible sort fields are shown in help (--help) for --sort command.

Share this post


Link to post
Share on other sites

Thanks for the quick replies!

I'm looking for this information: http://image.torrent-invites.com/images/370windows.png

Reference the stats window in the center of the page. Apparently this information is really easy to pull up for the gui client, but isn't available when using utorrent server / web ui... Any assistance you can provide would be immensely appreciated!

Going back to the sort function, the "eta" and "added_on" params seem to work fine, but I get the following error when using "completed_on":

python3 utorrentctl.py -l -s completed_on
Traceback (most recent call last):
File "utorrentctl.py", line 1368, in <module>
for h, t in sorted( utorrent.torrent_list().items(), key = lambda x: getattr( x[1], opts.sort_field ), reverse = opts.sort_desc ):
TypeError: unorderable types: int() < datetime.datetime()

BTW, is there any way I can send you a PM or email directly?

Regards,

JB

Share this post


Link to post
Share on other sites

I have uploaded a quick fix for this issue. Please download the script once again to see if it helps.

P.S. Also made it ignore sortfield case

Share this post


Link to post
Share on other sites

I have added support for reporting statistics. It turns out µTorrent Linux server doesn't report that plethora of statistical information as desktop client displays, basically only the transfer statistics for the last month are available.

Share this post


Link to post
Share on other sites

Sweet! Thanks for the stats!

Couple things.. is the month limit the same in the gui client or is that a function of utorrent server?

Also, I tried the stats command and I'm getting the following:

[root@home Public]# ./utorrentctl.py --stats
No address associated with hostname

In fact, I get the same error with other commands as well... e.g., :

[root@home Public]# ./utorrentctl.py -l
No address associated with hostname

My config.py file is populated with the same config that worked prior to this update... Think something changed on my side or did the stat update break something? BTW, --help still works fine... didn't try other commands...

jbmia

Share this post


Link to post
Share on other sites

Seems like the error on your side. Do you have server address written as host name in config.py? If yes, please try specifying the IP address.

> Couple things.. is the month limit the same in the gui client or is that a function of utorrent server?

I'm not sure. µTorrent Linux server doesn't provide a way to compare these numbers and I didn't check if desktop client WebUI offers getxferhist command.

Share this post


Link to post
Share on other sites

New version with ability to specify format of torrent list with -f. For example to show only name and ratio with sorting:

utorrentctl -l -f "{name} {ratio}" -s ratio

Full list of field can be received by issuing --dump on any torrent. Please be advised that this list differs for desktop and server versions of µTorrent.

Share this post


Link to post
Share on other sites

Can you provide a full example of setting up RSS.

I have added a new RSS feed, but I can't get the filter stuff to work so the RSS has no effect.

./utorrentctl.py --server-version

uTorrent/300B(25053)(server) ub1010-no/UT300B server v3.0.0.25053, engine v25053, ui v25053

./utorrentctl.py --rss-list

Feeds:

1 on TVTorrents.com|<url removed from post> (0/4) update: 2012-01-18 03:41:30

Filters:

1 on New Filter -> : +-

./utorrentctl.py --rssfilter-dump - returns no output

Share this post


Link to post
Share on other sites

Actually --rss-filter-dump requires that you supply the filter id so it your case it should look like this:

--rss-filter-dump 1

Does that solve your problem?

Share this post


Link to post
Share on other sites

Big thanks to TwistedFall.

I made a bash script type interace for this I use it for a remote server. This has more functionality that the webUI so NICE.

You can grab the script from:

http://lessthanhightech.weebly.com/utorrent-sshcli-interface.html

Allows you to add torrents with url even from private trackers with the right configuration.

Thanks again all who made this work.

Share this post


Link to post
Share on other sites

Hi,

I am looking for som to do download torrent data using magnet link. and wand to have command line client. Also it should indicate ( by some means) that torent is downloaded and seeding i startted.

Can I use utorrent for this ?

Any help will be appretiated

--mirani

Share this post


Link to post
Share on other sites

Hi, love this tool!

I had a question though. You can add torrents by supplying the torrent name via the --add-file command, but I would also like to be able to set the download folder. There is a command called --dir=DOWNLOAD_DIR, but if I user it, it says my command is invallid.

For reference, this is my command: utorrentctl.py -H <ip>:<port> -U "username" -P "password" --add-file "torrent location". If I add --dir="download location" at the end of this, it says invalid request. Without, it works just fine.

If you, or someone else could help me, it would be appreciated!

Share this post


Link to post
Share on other sites

Has anyone gotten this to work on windows? Im on server 2008 x86 and have tried everything.

Have gotten multiple errors with different versions of python. Using Utorrent 3.2

3.1.4

Traceback (most recent call last):

File "c:\users\torrent\desktop\utorrentctl.py", line 1490, in <module>

utorrent = uTorrentConnection( opts.host, opts.user, opts.password ).utorren

t( opts.api )

File "c:\users\torrent\desktop\utorrentctl.py", line 882, in utorrent

ver = Version( self.do_action( "getversion", retry = False ) )

File "c:\users\torrent\desktop\utorrentctl.py", line 172, in __init__

self.date = datetime.datetime( *map( int, date[0].split( "-" ) + date[1].spl

it( ":" ) ) )

IndexError: list index out of range

3.0.1 ( had to edit line 23 to get this version to work this far)

Traceback (most recent call last):

File "c:\users\torrent\desktop\utorrentctl.py", line 1490, in <module>

utorrent = uTorrentConnection( opts.host, opts.user, opts.password ).utorren

t( opts.api )

File "c:\users\torrent\desktop\utorrentctl.py", line 730, in __init__

self._url = "http://{}/".format( self._host )

ValueError: zero length field name in format

3.2.3

Traceback (most recent call last):

File "c:\users\torrent\desktop\utorrentctl.py", line 1490, in <module>

utorrent = uTorrentConnection( opts.host, opts.user, opts.password ).utorren

t( opts.api )

File "c:\users\torrent\desktop\utorrentctl.py", line 882, in utorrent

ver = Version( self.do_action( "getversion", retry = False ) )

File "c:\users\torrent\desktop\utorrentctl.py", line 172, in __init__

self.date = datetime.datetime( *map( int, date[0].split( "-" ) + date[1].spl

it( ":" ) ) )

IndexError: list index out of range

OK I got this to work used --api=falcon FTW

Share this post


Link to post
Share on other sites

Just want to bump this thread for some windows help

When I send the output to a text file it is all strung out any help would be great. Not very good with python.

Share this post


Link to post
Share on other sites