#2174 closed bug (Fixed)
Unable to add torrent via URL
Reported by: | underscor | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | 2.x |
Component: | Console UI | Version: | master |
Keywords: | Cc: |
Description
Hi guys! I get the following when attempting to add a torrent via URL. Any ideas?
deluge-console 'add -p "/1/downloads/9c8534b29cce486a571aa76f8225c35ee2e29d6d_wcd_ketsui-extra--dodon_manabu-namiki-_flac_lossless_1644875" "http://bt-download04/torrents.php?action=download&id=1644875&authkey=c28aba95c183165ef8ed2e8ae6a3bbbd&torrent_pass=4np8z7qkzb6dbv8pzdbqoqznvm7avir1"' /1/"http:/bt-download04/torrents.php?action=download&id=1644875&authkey=c28aba95c183165ef8ed2e8ae6a3bbbd&torrent_pass=4np8z7qkzb6dbv8pzdbqoqznvm7avir1" doesn't exist!
Change History (11)
comment:1 by , 12 years ago
comment:2 by , 12 years ago
Hah, that fixed it! Interesting... I assume that's not the intended behaviour, right?
comment:4 by , 12 years ago
Actually I'd like to talk to the console ui author before making any changes to see if there's any reason that they're doing it the way they are instead of just using the shlex module. I'll update this ticket when the problem is resolved!
comment:6 by , 12 years ago
Hi,
Would you mind testing out the following patch and seeing if it works for you?
-
deluge/ui/console/main.py
diff --git a/deluge/ui/console/main.py b/deluge/ui/console/main.py index 55a5c68..052e556 100644
a b 41 41 import re 42 42 import locale 43 43 44 try: 45 import shlex 46 except ImportError: 47 shlex = None 48 44 49 from twisted.internet import defer, reactor 45 50 46 51 import deluge.component as component … … def epilog(self): 266 271 def split(self, text): 267 272 if deluge.common.windows_check(): 268 273 text = text.replace('\\', '\\\\') 269 result = re.split(r"(?<!\\) ", text) 274 if shlex: 275 result = shlex.split(text) 276 else: 277 result = re.split(r"(?<!\\) ", text) 270 278 for i, s in enumerate(result): 271 279 result[i] = s.replace(r'\ ', ' ') 272 280 result = filter(lambda s: s != '', result) … … def write_event(self, s): 475 483 component.get("LegacyUI").add_line(s, False) 476 484 self.events.append(s) 477 485 else: 478 print colors.strip_colors(s.encode(self.encoding)) 479 No newline at end of file 486 print colors.strip_colors(s.encode(self.encoding))
comment:7 by , 12 years ago
Milestone: | Future → 1.4.0 |
---|---|
Priority: | critical → minor |
comment:8 by , 12 years ago
Sorry, I've been sick. I will recompile with the patch tomorrow and let you know. Thanks!
comment:9 by , 12 years ago
Totally dropped the ball on this.
The patch fixes the problem for me. Thanks <3 :)
Can you try without the double quotes? I think that my be the issue, when I looked they were still attached to the arguments. Obviously not correct but may allow you to continue with your testing :)