Giter Site home page Giter Site logo

btc's People

Contributors

kissiel avatar moussu avatar polosaty avatar qfiard avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

btc's Issues

Add support for getsettings

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.

tabs in btclient.py file

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)

Error when filesize is 0

Got exception "float division by zero" when calculating progress of filesize 0.

This can be found in btclient.py line 229.

Cannot add magnet links

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

Add label?

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

btc list: error

(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

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.