From 347781823b92b9f390bc1514ad3a3f9d59068460 Mon Sep 17 00:00:00 2001
From: notk0 <notk0@notk0-G73Jh.(none)>
Date: Mon, 16 Apr 2012 20:55:46 +0200
Subject: [PATCH] unquote magnet URIs before adding them
---
deluge/core/torrentmanager.py | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/deluge/core/torrentmanager.py b/deluge/core/torrentmanager.py
index df94550..5dd76cc 100644
a
|
b
|
|
42 | 42 | import shutil |
43 | 43 | import operator |
44 | 44 | import re |
| 45 | from urllib import unquote |
45 | 46 | |
46 | 47 | from twisted.internet import reactor |
47 | 48 | from twisted.internet.task import LoopingCall |
… |
… |
def add(self, torrent_info=None, state=None, options=None, save_state=True,
|
449 | 450 | handle = None |
450 | 451 | try: |
451 | 452 | if magnet: |
452 | | handle = lt.add_magnet_uri(self.session, utf8_encoded(magnet), add_torrent_params) |
| 453 | handle = lt.add_magnet_uri(self.session, utf8_encoded(unquote(magnet)), add_torrent_params) |
453 | 454 | else: |
454 | 455 | handle = self.session.add_torrent(add_torrent_params) |
455 | 456 | except RuntimeError, e: |