fagga/transmission-remote-cli — Issue #53: Unnecessary Check for Transmission Version >= v2.3 in 2.40 Branch
Author: gzio
Created: 2012-02-15 15:01:37+00:00
State: open

per topic, there is no need to check Transmission version regarding the uTP option in the 2.40 branch. the following patch just restores the code to original before the latest merge.

```
--- transmission-remote-cli.py.old	2012-02-15 09:41:37.000000000 -0500
+++ transmission-remote-cli.py	2012-02-15 09:44:52.000000000 -0500
@@ -2599,15 +2599,12 @@
('Peer E_xchange', ('disabled','enabled ')[self.stats['pex-enabled']]),
('_Distributed Hash Table', ('disabled','enabled ')[self.stats['dht-enabled']]),
('_Local Peer Discovery', ('disabled','enabled ')[self.stats['lpd-enabled']]),
+ ('_uTP', ('disabled','enabled ')[self.stats['utp-enabled']]),
('_Global Peer Limit', "%d" % self.stats['peer-limit-global']),
('Peer Limit per _Torrent', "%d" % self.stats['peer-limit-per-torrent']),
('Protocol En_cryption', "%s" % self.stats['encryption']),
('_Seed Ratio Limit', "%s" % ('unlimited',self.stats['seedRatioLimit'])[self.stats['seedRatioLimited']])]

- # uTP support was added in Transmission v2.3
- if self.server.get_tm_version() >= 2.3:
- options.append(('_uTP', ('disabled','enabled')[self.stats['utp-enabled']]))
-
max_len = max([sum([len(re.sub('_', '', x)) for x in y[0]]) for y in options])
win = self.window(len(options)+2, max_len+15, '', "Global Options")
```