From f491254dfd1968b0a04aeaeba4d64faf73ec7419 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joel=20K=C3=A5berg?= Date: Sat, 2 Mar 2013 10:26:08 +0100 Subject: [PATCH] added functions - remove - removedata - recheck --- utorrent/client.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/utorrent/client.py b/utorrent/client.py index baffbf6e..ca9d83e5 100644 --- a/utorrent/client.py +++ b/utorrent/client.py @@ -76,6 +76,24 @@ class UTorrentClient(object): for hash in hashes: params.append(('hash', hash)) return self._action(params) + + def remove(self, *hashes): + params = [('action', 'remove'),] + for hash in hashes: + params.append(('hash', hash)) + return self._action(params) + + def removedata(self, *hashes): + params = [('action', 'removedata'),] + for hash in hashes: + params.append(('hash', hash)) + return self._action(params) + + def recheck(self, *hashes): + params = [('action', 'recheck'),] + for hash in hashes: + params.append(('hash', hash)) + return self._action(params) def getfiles(self, hash): params = [('action', 'getfiles'), ('hash', hash)]