bittorrent / btc Goto Github PK
View Code? Open in Web Editor NEWCommand-line BitTorrent remote control (btc)
License: MIT License
Command-line BitTorrent remote control (btc)
License: MIT License
Add ability to recheck torrent.
Perhaps I am missing it, but it seems that it's currently not possible to modify uTorrent's global settings through getsettings Web API with btc. Such option would be very useful.
After installing in python 3 using pip:
pip install -U https://github.com/bittorrent/btc/tarball/master
I get this error when trying to use help for the add command:
$ btc add --help
Traceback (most recent call last):
File "/usr/local/bin/btc", line 6, in <module>
from btc.btc import main
File "/usr/local/lib/python3.7/site-packages/btc/btc.py", line 7, in <module>
from .btclient import BTClient, BTClientError
File "/usr/local/lib/python3.7/site-packages/btc/btclient.py", line 233
f['progress'] = 0.0
^
TabError: inconsistent use of tabs and spaces in indentation
The btclient.py file is the only offender:
drogers@drogers-mbp:~/code/python/btc/btc (master)
$ ls
__init__.py btc_add.py btc_filter.py btc_reduce.py btc_set.py btc_start.py btc_wait.py
bencode.py btc_download.py btc_list.py btc_remove.py btc_show.py btc_stop.py btclient.py
btc.py btc_files.py btc_recheck.py btc_select.py btc_sort.py btc_stream.py utils.py
drogers@drogers-mbp:~/code/python/btc/btc (master)
$ egrep '\t' *.py
btclient.py: f['progress'] = 0.0
btclient.py: f['progress'] = round(100. * l[2] / l[1], 2)
Got exception "float division by zero" when calculating progress of filesize 0.
This can be found in btclient.py line 229.
It appears that magnet links do not work, as I get the following error:
$ btc add magnet:?xt=urn:btih:91ea15451a642d7ff25485e0441ae869b86b4467&dn=ubuntu-12.04.2-desktop-i386.iso&tr=udp%3A%2F%2Ftracker.openbittorrent.com%3A80&tr=udp%3A%2F%2Ftracker.publicbt.com%3A80&tr=udp%3A%2F%2Ftracker.istole.it%3A6969&tr=udp%3A%2F%2Ftracker.ccc.de%3A80&tr=udp%3A%2F%2Fopen.demonii.com%3A1337
[1] 30326
[2] 30327
[3] 30328
[4] 30329
[5] 30330
[6] 30331
[2] Done dn=ubuntu-12.04.2-desktop-i386.iso
[3] Done tr=udp%3A%2F%2Ftracker.openbittorrent.com%3A80
[4] Done tr=udp%3A%2F%2Ftracker.publicbt.com%3A80
[5]- Done tr=udp%3A%2F%2Ftracker.istole.it%3A6969
scott@box:~/Desktop$ Traceback (most recent call last):
File "/usr/local/bin/btc", line 8, in <module>
load_entry_point('btc==0.1', 'console_scripts', 'btc')()
File "/Library/Python/2.7/site-packages/btc/btc.py", line 169, in main
module.main()
File "/Library/Python/2.7/site-packages/btc/btc_add.py", line 27, in main
torrent = utils.get(args.value, utf8=False)
File "/Library/Python/2.7/site-packages/btc/utils.py", line 109, in get
response, content = make_request(h, host + selector, headers=headers)
File "/Library/Python/2.7/site-packages/btc/utils.py", line 67, in make_request
return http.request(*args, **kwargs)
File "/Library/Python/2.7/site-packages/httplib2/__init__.py", line 1454, in request
proxy_info=proxy_info)
File "/Library/Python/2.7/site-packages/httplib2/__init__.py", line 860, in __init__
httplib.HTTPConnection.__init__(self, host, port, strict)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py", line 693, in __init__
self._set_hostport(host, port)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py", line 718, in _set_hostport
raise InvalidURL("nonnumeric port: '%s'" % host[i+1:])
httplib.InvalidURL: nonnumeric port: ''
[1]- Exit 1 btc add magnet:?xt=urn:btih:91ea15451a642d7ff25485e0441ae869b86b4467
[6]+ Done tr=udp%3A%2F%2Ftracker.ccc.de%3A80
I am sorry I had to go through issues to make contact but I dont know how else to do it. I realise this is hasnt been touched for a while. All I want to know is if there is a way of adding a label using this program? If the function isnt there but can be implemented easily I will try and do it if I can get some pointers on what to modify. Thanks for a handy little program
(pytorrent_server:2.7)[djalmabr@h32 pytorrent_server]$ btc set host 177.85.98.245
(pytorrent_server:2.7)[djalmabr@h32 pytorrent_server]$ btc set port 8080
(pytorrent_server:2.7)[djalmabr@h32 pytorrent_server]$ btc list
btc list: error: connection failed, try to modify the settings file
note: settings file is: /home/djalmabr/.btc
note: current settings are:
host: 177.85.98.245
password: gauther780
port: 8080
username: admin
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.