Ticket #2087: 0001-unquote-magnet-URIs-before-processing-them.patch

File 0001-unquote-magnet-URIs-before-processing-them.patch, 1.0 KB (added by Raziel.Azrael, 12 years ago)

A patch to fix this issue (hopefull final )

  • deluge/core/torrentmanager.py

    From a9d88d3961193523e91cf967c788f4ea8dc18829 Mon Sep 17 00:00:00 2001
    From: Raziel.Azrael <shogunrua1337@hotmail.com>
    Date: Thu, 19 Apr 2012 17:56:09 +0200
    Subject: [PATCH] unquote magnet URIs before processing them
    
    ---
     deluge/core/torrentmanager.py |    2 ++
     1 files changed, 2 insertions(+), 0 deletions(-)
    
    diff --git a/deluge/core/torrentmanager.py b/deluge/core/torrentmanager.py
    index df94550..06eedbc 100644
    a b  
    4242import shutil 
    4343import operator 
    4444import re 
     45from urllib import unquote 
    4546 
    4647from twisted.internet import reactor 
    4748from twisted.internet.task import LoopingCall 
    def add(self, torrent_info=None, state=None, options=None, save_state=True, 
    449450        handle = None 
    450451        try: 
    451452            if magnet: 
     453                magnet = unquote(magnet)  
    452454                handle = lt.add_magnet_uri(self.session, utf8_encoded(magnet), add_torrent_params) 
    453455            else: 
    454456                handle = self.session.add_torrent(add_torrent_params)