Commits

Erik Svensson committed 82d5b04

Fixed documentation issues.

  • Participants
  • Parent commits 99cce6f

Comments (0)

Files changed (5)

 Getting started
 ===============
 
-transmissionrpc 0.8 is compatible with Transmission 1.31 - 2.40.
+transmissionrpc 0.8 is compatible with Transmission 1.31 - 2.41.
 
 Requirements
 ------------

transmissionrpc/client.py

         Add torrent to transfers list. Takes a base64 encoded .torrent file in data.
         Additional arguments are:
 
-        ===================== ==== =============================================================
-        Argument              RPC  Description
-        ===================== ==== =============================================================
-        ``bandwidthPriority`` 8 -  Priority for this transfer.
-        ``download_dir``      1 -  The directory where the downloaded contents will be saved in.
-        ``filename``          1 -  A file path or URL to a torrent file or a magnet link.
-        ``files_unwanted``    1 -  A list of file id's that shouldn't be downloaded.
-        ``files_wanted``      1 -  A list of file id's that should be downloaded.
-        ``metainfo``          1 -  The content of a torrent file, base64 encoded.
-        ``paused``            1 -  If True, does not start the transfer when added.
-        ``peer_limit``        1 -  Maximum number of peers allowed.
-        ``priority_high``     1 -  A list of file id's that should have high priority.
-        ``priority_low``      1 -  A list of file id's that should have low priority.
-        ``priority_normal``   1 -  A list of file id's that should have normal priority.
-        ===================== ==== =============================================================
+        ===================== ===== =========== =============================================================
+        Argument              RPC   Replaced by Description
+        ===================== ===== =========== =============================================================
+        ``bandwidthPriority`` 8 -               Priority for this transfer.
+        ``cookies``           13 -              One or more HTTP cookie(s).
+        ``download_dir``      1 -               The directory where the downloaded contents will be saved in.
+        ``files_unwanted``    1 -               A list of file id's that shouldn't be downloaded.
+        ``files_wanted``      1 -               A list of file id's that should be downloaded.
+        ``paused``            1 -               If True, does not start the transfer when added.
+        ``peer_limit``        1 -               Maximum number of peers allowed.
+        ``priority_high``     1 -               A list of file id's that should have high priority.
+        ``priority_low``      1 -               A list of file id's that should have low priority.
+        ``priority_normal``   1 -               A list of file id's that should have normal priority.
+        ===================== ===== =========== =============================================================
+
         """
         args = {}
         if data:
         all uri's supported by Transmissions torrent-add 'filename'
         argument. Additional arguments are:
 
-        ===================== ==== =============================================================
-        Argument              RPC  Description
-        ===================== ==== =============================================================
-        ``bandwidthPriority`` 8 -  Priority for this transfer.
-        ``download_dir``      1 -  The directory where the downloaded contents will be saved in.
-        ``files_unwanted``    1 -  A list of file id's that shouldn't be downloaded.
-        ``files_wanted``      1 -  A list of file id's that should be downloaded.
-        ``paused``            1 -  If True, does not start the transfer when added.
-        ``peer_limit``        1 -  Maximum number of peers allowed.
-        ``priority_high``     1 -  A list of file id's that should have high priority.
-        ``priority_low``      1 -  A list of file id's that should have low priority.
-        ``priority_normal``   1 -  A list of file id's that should have normal priority.
-        ===================== ==== =============================================================
+        ===================== ===== =========== =============================================================
+        Argument              RPC   Replaced by Description
+        ===================== ===== =========== =============================================================
+        ``bandwidthPriority`` 8 -               Priority for this transfer.
+        ``cookies``           13 -              One or more HTTP cookie(s).
+        ``download_dir``      1 -               The directory where the downloaded contents will be saved in.
+        ``files_unwanted``    1 -               A list of file id's that shouldn't be downloaded.
+        ``files_wanted``      1 -               A list of file id's that should be downloaded.
+        ``paused``            1 -               If True, does not start the transfer when added.
+        ``peer_limit``        1 -               Maximum number of peers allowed.
+        ``priority_high``     1 -               A list of file id's that should have high priority.
+        ``priority_low``      1 -               A list of file id's that should have low priority.
+        ``priority_normal``   1 -               A list of file id's that should have normal priority.
+        ===================== ===== =========== =============================================================
         """
         if uri == None:
             raise ValueError('add_uri requires a URI.')
         ``priority_high``            1 -                   A list of file id's that should have high priority.
         ``priority_low``             1 -                   A list of file id's that should have normal priority.
         ``priority_normal``          1 -                   A list of file id's that should have low priority.
+        ``queuePosition``            14 -                  Position of this transfer in its queue.
         ``seedIdleLimit``            10 -                  Seed inactivity limit in minutes.
         ``seedIdleMode``             10 -                  Seed inactivity mode. 0 = Use session limit, 1 = Use transfer limit, 2 = Disable limit.
         ``seedRatioLimit``           5 -                   Seeding ratio.
         self._request('queue-move-bottom', ids=ids, require_ids=True, timeout=timeout)
         
     def queue_up(self, ids, timeout=None):
-        """Move transfer to the top of the queue."""
+        """Move transfer up in the queue."""
         self._rpc_version_warning(14)
         self._request('queue-move-up', ids=ids, require_ids=True, timeout=timeout)
 
     def queue_down(self, ids, timeout=None):
-        """Move transfer to the bottom of the queue."""
+        """Move transfer down in the queue."""
         self._rpc_version_warning(14)
         self._request('queue-move-down', ids=ids, require_ids=True, timeout=timeout)
 
         ``alt_speed_time_end``           5 -                     Time when alternate speeds should be disabled. Minutes after midnight.
         ``alt_speed_up``                 5 -                     Alternate session upload speed limit (in Kib/s).
         ``blocklist_enabled``            5 -                     Enables the block list
+        ``blocklist_url``                11 -                    Location of the block list. Updated with blocklist-update.
         ``cache_size_mb``                10 -                    The maximum size of the disk cache in MB
         ``dht_enabled``                  6 -                     Enables DHT.
         ``download_dir``                 1 -                     Set the session download directory.
+        ``download_queue_enabled``       14 -                    Enable parallel download restriction.
+        ``download_queue_size``          14 -                    Number of parallel downloads.
         ``encryption``                   1 -                     Set the session encryption mode, one of ``required``, ``preferred`` or ``tolerated``.
         ``idle_seeding_limit``           10 -                    The default seed inactivity limit in minutes.
         ``idle_seeding_limit_enabled``   10 -                    Enables the default seed inactivity limit
         ``pex_enabled``                  5 -                     Allowing PEX in public torrents.
         ``port``                         1 - 5 peer-port         Peer port.
         ``port_forwarding_enabled``      1 -                     Enables port forwarding.
+        ``queue_stalled_enabled``        14 -                    Enable tracking of stalled transfers.
+        ``queue_stalled_minutes``        14 -                    Number of minutes of idle that marks a transfer as stalled.
         ``rename_partial_files``         8 -                     Appends ".part" to incomplete files
         ``script_torrent_done_enabled``  9 -                     Whether or not to call the "done" script.
         ``script_torrent_done_filename`` 9 -                     Filename of the script to run when the transfer is done.
+        ``seed_queue_enabled``           14 -                    Enable parallel upload restriction.
+        ``seed_queue_size``              14 -                    Number of parallel uploads.
         ``seedRatioLimit``               5 -                     Seed ratio limit. 1.0 means 1:1 download and upload ratio.
         ``seedRatioLimited``             5 -                     Enables seed ration limit.
         ``speed_limit_down``             1 -                     Download speed limit (in Kib/s).
         ``speed_limit_up_enabled``       1 -                     Enables upload speed limiting.
         ``start_added_torrents``         9 -                     Added torrents will be started right away.
         ``trash_original_torrent_files`` 9 -                     The .torrent file of added torrents will be deleted.
+        ``utp_enabled``                  13 -                    Enables Micro Transport Protocol (UTP).
         ================================ ===== ================= ==========================================================================================================================
 
         .. NOTE::

transmissionrpc/constants.py

         'bandwidthPriority':            ('number', 8, None, None, None, 'Priority for this transfer.'),
         'download-dir':                 ('string', 1, None, None, None, 'The directory where the downloaded contents will be saved in.'),
         'cookies':                      ('string', 13, None, None, None, 'One or more HTTP cookie(s).'),
-        'filename':                     ('string', 1, None, None, None, "A filepath or URL to a torrent file or a magnet link."),
+        'filename':                     ('string', 1, None, None, None, "A file path or URL to a torrent file or a magnet link."),
         'files-wanted':                 ('array', 1, None, None, None, "A list of file id's that should be downloaded."),
         'files-unwanted':               ('array', 1, None, None, None, "A list of file id's that shouldn't be downloaded."),
         'metainfo':                     ('string', 1, None, None, None, 'The content of a torrent file, base64 encoded.'),
         "alt-speed-time-day":           ('number', 5, None, None, None, 'Enables alternate speeds scheduling these days.'),
         "alt-speed-up":                 ('number', 5, None, None, None, 'Alternate session upload speed limit (in Kib/s).'),
         "blocklist-enabled":            ('boolean', 5, None, None, None, 'Enables the block list'),
-        "blocklist-url":                ('string', 11, None, None, None, 'Location of the blocklist. Updated with blocklist-update.'),
+        "blocklist-url":                ('string', 11, None, None, None, 'Location of the block list. Updated with blocklist-update.'),
         "cache-size-mb":                ('number', 10, None, None, None, 'The maximum size of the disk cache in MB'),
         "dht-enabled":                  ('boolean', 6, None, None, None, 'Enables DHT.'),
         "download-dir":                 ('string', 1, None, None, None, 'Set the session download directory.'),

transmissionrpc/session.py

 
     Access the session field can be done through attributes.
     The attributes available are the same as the session arguments in the
-    Transmission RPC specification, but with underscore instead of hypen.
+    Transmission RPC specification, but with underscore instead of hyphen.
     ``download-dir`` -> ``download_dir``.
     """
 
     def __init__(self, fields=None):
         self.fields = {}
-        if fields != None:
+        if fields is None:
             self.update(fields)
 
     def update(self, other):
-        """Update the session data from a session arguments dictinary"""
+        """Update the session data from a session arguments dictionary"""
 
         fields = None
         if isinstance(other, dict):

transmissionrpc/torrent.py

         The file information is has following fields:
         ::
 
-        {
-        <file id>: {
-        'name': <file name>,
-        'size': <file size in bytes>,
-        'completed': <bytes completed>,
-        'priority': <priority ('high'|'normal'|'low')>,
-        'selected': <selected for download>
-        }
-
-        ...
-        }
+            {
+                <file id>: {
+                    'name': <file name>,
+                    'size': <file size in bytes>,
+                    'completed': <bytes completed>,
+                    'priority': <priority ('high'|'normal'|'low')>,
+                    'selected': <selected for download>
+                }
+                ...
+            }
         """
         result = {}
         if 'files' in self.fields: