1. Erik Svensson
  2. transmissionrpc

Commits

Erik Svensson  committed 06490f8

Fix an issue with deselecting all files using Client.set_files. Issue #52.

  • Participants
  • Parent commits 8d7a345
  • Branches default

Comments (0)

Files changed (1)

File transmissionrpc/client.py

View file
                     elif file_desc['priority'] == 'low':
                         low.append(fid)
             args = {
-                'timeout': timeout,
-                'files_wanted': wanted,
-                'files_unwanted': unwanted,
+                'timeout': timeout
             }
             if len(high) > 0:
                 args['priority_high'] = high
                 args['priority_normal'] = normal
             if len(low) > 0:
                 args['priority_low'] = low
-            self.change([tid], **args)
+            if len(wanted) > 0:
+                args['files_wanted'] = wanted
+            if len(unwanted) > 0:
+                args['files_unwanted'] = unwanted
+            self.change_torrent([tid], **args)
 
     def change_torrent(self, ids, timeout=None, **kwargs):
         """