Commits

Erik Svensson  committed 8c4ce14

Using uploadRatio in Torrent.ratio. Issue #30.
Change version number.

  • Participants
  • Parent commits e1eee1b

Comments (0)

Files changed (8)

+Transmissionrpc 0.8
+-------------------
+
+Fixed argument "location" falsely named "ids" for Client.change. Issue #31.
+Fixed Torrent.ratio to use response value uploadRatio. Issue #30.
+
 Transmissionrpc 0.7
 -------------------
 
 Getting started
 ===============
 
-transmissionrpc 0.7 is compatible with Transmission 1.31 - 2.12.
+transmissionrpc 0.8 is compatible with Transmission 1.31 - 2.13.
 
 Requirements
 ------------
 
 transmissionrpc is hosted by bitbucket at http://www.bitbucket.org/blueluna/transmissionrpc/.
 
-Copyright (c) 2008-2010 Erik Svensson.
+Copyright (c) 2008-2011 Erik Svensson.
 # -*- coding: utf-8 -*-
-# Copyright (c) 2008-2010 Erik Svensson <erik.public@gmail.com>
+# Copyright (c) 2008-2011 Erik Svensson <erik.public@gmail.com>
 # Licensed under the MIT license.
 #
 # Vxl documentation build configuration file, created by
 
 # General substitutions.
 project = 'Transmission RPC'
-copyright = '2008-2010, Erik Svensson'
+copyright = '2008-2011, Erik Svensson'
 
 # The default replacements for |version| and |release|, also used in various
 # other places throughout the built documents.
 #
 # The short X.Y version.
-version = '0.7'
+version = '0.8'
 # The full version, including alpha/beta/rc tags.
-release = '0.7'
+release = '0.8'
 
 # There are two options for replacing |today|: either, you set today to some
 # non-false value, then it is used:

File doc/index.rst

 
 ::
 
-    $ tar -xzf transmissionrpc-0.7.tar.gz
-    $ cd transmissionrpc-0.7
+    $ tar -xzf transmissionrpc-0.8.tar.gz
+    $ cd transmissionrpc-0.8
     $ python setup.py install
 
 Dependecies
 
 * :ref:`genindex`
 * :ref:`modindex`
-* :ref:`search`
+* :ref:`search`
 
 setup(
     name='transmissionrpc',
-    version='0.7',
+    version='0.8',
     description='Python module that implements the Transmission bittorent client RPC protocol.',
     author='Erik Svensson',
     author_email='erik.public@gmail.com',

File transmissionrpc/__init__.py

 from transmissionrpc.utils import add_stdout_logger
 
 __author__    = u'Erik Svensson <erik.public@gmail.com>'
-__version__   = u'0.7'
+__version__   = u'0.8'
 __copyright__ = u'Copyright (c) 2008-2010 Erik Svensson'
 __license__   = u'MIT'

File transmissionrpc/client.py

         """list all torrents"""
         fields = ['id', 'hashString', 'name', 'sizeWhenDone', 'leftUntilDone'
             , 'eta', 'status', 'rateUpload', 'rateDownload', 'uploadedEver'
-            , 'downloadedEver']
+            , 'downloadedEver', 'uploadRatio']
         return self._request('torrent-get', {'fields': fields}, timeout=timeout)
 
     def change(self, ids, timeout=None, **kwargs):

File transmissionrpc/torrent.py

     @property
     def ratio(self):
         """Get the upload/download ratio."""
-        try:
-            return self.fields['uploadedEver'] / float(self.fields['downloadedEver'])
-        except ZeroDivisionError:
-            return 0.0
+        return float(self.fields['uploadRatio'])
 
     @property
     def eta(self):