summaryrefslogtreecommitdiffstats
path: root/transmission-remote-cli.py
diff options
context:
space:
mode:
Diffstat (limited to 'transmission-remote-cli.py')
-rwxr-xr-xtransmission-remote-cli.py21
1 files changed, 14 insertions, 7 deletions
diff --git a/transmission-remote-cli.py b/transmission-remote-cli.py
index e7dfb9e..8a2497b 100755
--- a/transmission-remote-cli.py
+++ b/transmission-remote-cli.py
@@ -16,10 +16,10 @@
# http://www.gnu.org/licenses/gpl-3.0.txt #
########################################################################
-VERSION = '1.1.1'
+VERSION = '1.2'
TRNSM_VERSION_MIN = '1.90'
-TRNSM_VERSION_MAX = '2.50'
+TRNSM_VERSION_MAX = '2.51'
RPC_VERSION_MIN = 8
RPC_VERSION_MAX = 14
@@ -183,7 +183,6 @@ class TransmissionRequest:
if session_id:
self.http_request.add_header('X-Transmission-Session-Id', session_id)
self.open_request = urllib2.urlopen(self.http_request)
- debug(self.http_request.get_data() + "\n\n")
except AttributeError:
# request data (http_request) isn't specified yet -- data will be available on next call
pass
@@ -221,7 +220,6 @@ class TransmissionRequest:
authhandler.retried = 0
try:
data = json.loads(unicode(response))
- debug(data)
except ValueError:
quit("Cannot parse response: %s\n" % response, JSON_ERROR)
self.open_request = None
@@ -253,11 +251,11 @@ class Transmission:
'peersConnected', 'uploadLimit', 'downloadLimit',
'uploadLimited', 'downloadLimited', 'bandwidthPriority',
'peersSendingToUs', 'peersGettingFromUs',
- 'seedRatioLimit', 'seedRatioMode' ]
+ 'seedRatioLimit', 'seedRatioMode', 'isPrivate' ]
DETAIL_FIELDS = [ 'files', 'priorities', 'wanted', 'peers', 'trackers',
'activityDate', 'dateCreated', 'startDate', 'doneDate',
- 'totalSize', 'leftUntilDone', 'comment', 'isPrivate',
+ 'totalSize', 'leftUntilDone', 'comment',
'hashString', 'pieceCount', 'pieceSize', 'pieces',
'downloadedEver', 'corruptEver', 'peersFrom' ] + LIST_FIELDS
@@ -1091,7 +1089,7 @@ class Interface:
if self.selected_torrent == -1:
options = [('uploading','_Uploading'), ('downloading','_Downloading'),
('active','Ac_tive'), ('paused','_Paused'), ('seeding','_Seeding'),
- ('incomplete','In_complete'), ('verifying','Verif_ying'),
+ ('incomplete','In_complete'), ('verifying','Verif_ying'), ('private','P_rivate'),
('invert','In_vert'), ('','_All')]
choice = self.dialog_menu(('Show only','Filter all')[self.filter_inverse], options,
map(lambda x: x[0]==self.filter_list, options).index(True)+1)
@@ -1197,6 +1195,7 @@ class Interface:
self.selected_torrent = -1
self.details_category_focus = 0
server.remove_torrent(self.torrents[self.focus]['id'])
+ self.focus_next_after_delete()
def remove_torrent_local_data(self, c):
if self.focus > -1:
@@ -1207,6 +1206,12 @@ class Interface:
self.selected_torrent = -1
self.details_category_focus = 0
server.remove_torrent_local_data(self.torrents[self.focus]['id'])
+ self.focus_next_after_delete()
+
+ def focus_next_after_delete(self):
+ """ Focus next torrent after user deletes torrent """
+ new_focus = min(self.focus + 1, len(self.torrents) - 2)
+ self.focused_id = self.torrents[new_focus]['id']
def add_tracker(self):
if server.get_rpc_version() < 10:
@@ -1419,6 +1424,8 @@ class Interface:
or t['status'] == Transmission.STATUS_SEED_WAIT]
elif self.filter_list == 'incomplete':
self.torrents = [t for t in self.torrents if t['percentDone'] < 100]
+ elif self.filter_list == 'private':
+ self.torrents = [t for t in self.torrents if t['isPrivate']]
elif self.filter_list == 'active':
self.torrents = [t for t in self.torrents if t['peersGettingFromUs'] > 0 \
or t['peersSendingToUs'] > 0 \
lcd4linux.git/commit/lcd4linux.conf.sample?id=dfcd00a79bf78f14f8699b303b1e8bb4d77d53f0&follow=1'>[lcd4linux @ 2005-05-02 05:15:46 by reinelt]reinelt4-9/+51 make busy-flag checking configurable for LCD-Linux driver git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@535 3ae390bd-cb1e-0410-b409-cd5a39f66f1f 2005-04-30[lcd4linux @ 2005-04-30 06:02:09 by reinelt]reinelt3-15/+44 LCD-Linux display size set up from lcd4linux.conf git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@534 3ae390bd-cb1e-0410-b409-cd5a39f66f1f 2005-04-24[lcd4linux @ 2005-04-24 05:27:09 by reinelt]reinelt2-7/+38 Trefon Backlight added git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@533 3ae390bd-cb1e-0410-b409-cd5a39f66f1f 2005-04-24[lcd4linux @ 2005-04-24 04:41:28 by reinelt]reinelt1-0/+68 Changelog updated git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@532 3ae390bd-cb1e-0410-b409-cd5a39f66f1f 2005-04-24[lcd4linux @ 2005-04-24 04:33:46 by reinelt]reinelt9-10/+444 driver for TREFON USB LCD's added git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@531 3ae390bd-cb1e-0410-b409-cd5a39f66f1f 2005-04-20[lcd4linux @ 2005-04-20 05:49:21 by reinelt]reinelt1-44/+125 Changed the code to add some VT100-compatible control sequences (see the comments above). A configfile boolean option 'VT100_Support' (default to 1) indicate if the display in used support these control-sequences or not. git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@530 3ae390bd-cb1e-0410-b409-cd5a39f66f1f 2005-04-09[lcd4linux @ 2005-04-09 07:36:42 by reinelt]reinelt2-17/+99 updated LCD-Linux driver to version 0.8.8 git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@529 3ae390bd-cb1e-0410-b409-cd5a39f66f1f 2005-04-05[lcd4linux @ 2005-04-05 06:57:39 by reinelt]reinelt3-34/+34 AC_CHECK_HEADERS corrected git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@528 3ae390bd-cb1e-0410-b409-cd5a39f66f1f 2005-04-05[lcd4linux @ 2005-04-05 05:12:48 by reinelt]reinelt4-407/+33 i2c patch from Paul (still does not work here :-( git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@527 3ae390bd-cb1e-0410-b409-cd5a39f66f1f 2005-04-05[lcd4linux @ 2005-04-05 04:46:06 by reinelt]reinelt1-1/+20 ceil/floor patch from Maxime git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@526 3ae390bd-cb1e-0410-b409-cd5a39f66f1f 2005-04-04[lcd4linux @ 2005-04-04 20:11:14 by nicowallmeier]nicowallmeier1-2/+6 to be compatible with gcc 2.95 git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@525 3ae390bd-cb1e-0410-b409-cd5a39f66f1f 2005-04-03[lcd4linux @ 2005-04-03 07:07:43 by reinelt]reinelt8-9/+152 added statfs plugin git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@524 3ae390bd-cb1e-0410-b409-cd5a39f66f1f 2005-04-02[lcd4linux @ 2005-04-02 05:28:58 by reinelt]reinelt3-19/+27 fixed gcc4 warnings about signed/unsigned mismatches git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@523 3ae390bd-cb1e-0410-b409-cd5a39f66f1f 2005-04-01[lcd4linux @ 2005-04-01 05:16:04 by reinelt]reinelt5-584/+694 moved plugin init stuff to a seperate function called on first use git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@522 3ae390bd-cb1e-0410-b409-cd5a39f66f1f 2005-03-30[lcd4linux @ 2005-03-30 04:57:50 by reinelt]reinelt3-23/+67 Evaluator speedup: use bsearch for finding functions and variables git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@521 3ae390bd-cb1e-0410-b409-cd5a39f66f1f 2005-03-28[lcd4linux @ 2005-03-28 22:29:23 by reinelt]reinelt1-250/+346 HD44780 multiple displays patch from geronet git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@520 3ae390bd-cb1e-0410-b409-cd5a39f66f1f 2005-03-28[lcd4linux @ 2005-03-28 19:39:14 by reinelt]reinelt9-256/+1147 HD44780/I2C patch from Luis merged (still does not work for me) git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@519 3ae390bd-cb1e-0410-b409-cd5a39f66f1f 2005-03-25[lcd4linux @ 2005-03-25 15:44:43 by reinelt]reinelt1-2/+5 HD44780 Backlight fixed (thanks to geronet) git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@518 3ae390bd-cb1e-0410-b409-cd5a39f66f1f 2005-03-23[lcd4linux @ 2005-03-23 12:23:35 by reinelt]reinelt1-27/+32 fixed some signed/unsigned char mismatches in the Crystalfontz driver (ticket #12) git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@517 3ae390bd-cb1e-0410-b409-cd5a39f66f1f 2005-02-24[lcd4linux @ 2005-02-24 07:07:55 by reinelt]reinelt1-0/+53 ChangeLog git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@516 3ae390bd-cb1e-0410-b409-cd5a39f66f1f 2005-02-24[lcd4linux @ 2005-02-24 07:06:45 by reinelt]reinelt11-28/+347 SimpleLCD driver added git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@515 3ae390bd-cb1e-0410-b409-cd5a39f66f1f 2005-02-24[lcd4linux @ 2005-02-24 06:51:40 by reinelt]reinelt1-4/+5 LCD-Linux driver GOTO_COST corrected git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@514 3ae390bd-cb1e-0410-b409-cd5a39f66f1f 2005-01-30[lcd4linux @ 2005-01-30 06:43:22 by reinelt]reinelt4-69/+95 driver for LCD-Linux finished git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@513 3ae390bd-cb1e-0410-b409-cd5a39f66f1f 2005-01-29[lcd4linux @ 2005-01-29 09:30:56 by reinelt]reinelt1-8/+11 minor HD44780 cleanups git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@512 3ae390bd-cb1e-0410-b409-cd5a39f66f1f 2005-01-22[lcd4linux @ 2005-01-22 22:57:57 by reinelt]reinelt9-47/+382 LCD-Linux driver added git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@511 3ae390bd-cb1e-0410-b409-cd5a39f66f1f 2005-01-22[lcd4linux @ 2005-01-22 12:44:41 by reinelt]reinelt1-3/+6 MatrixOrbital backlight micro-fix git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@510 3ae390bd-cb1e-0410-b409-cd5a39f66f1f 2005-01-18[lcd4linux @ 2005-01-18 06:30:21 by reinelt]reinelt89-261/+603 added (C) to all copyright statements git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@509 3ae390bd-cb1e-0410-b409-cd5a39f66f1f 2005-01-17[lcd4linux @ 2005-01-17 06:38:48 by reinelt]reinelt1-1/+6 info about backlight and brightness git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@508 3ae390bd-cb1e-0410-b409-cd5a39f66f1f 2005-01-17[lcd4linux @ 2005-01-17 06:29:24 by reinelt]reinelt3-33/+85 added software-controlled backlight support to HD44780 git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@507 3ae390bd-cb1e-0410-b409-cd5a39f66f1f