[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    =?utf-8?q?=5Bktorrent/4=2E1=5D_kio-magnet=3A_Allow_dash-seperate?=
From:       Christian Weilbach <christian_weilbach () web ! de>
Date:       2011-03-02 5:31:10
Message-ID: 20110302053110.C5E71A60CD () git ! kde ! org
[Download RAW message or body]

Git commit dc4e672efee915895333bc4069b95f7c9b87030f by Christian Weilbach.
Committed on 02/03/2011 at 06:29.
Pushed by weilbach into branch '4.1'.

Allow dash-seperated list of hashes later on. Backport.

M  +2    -1    kio-magnet/dbushandler.cpp     

http://commits.kde.org/ktorrent/dc4e672efee915895333bc4069b95f7c9b87030f

diff --git a/kio-magnet/dbushandler.cpp b/kio-magnet/dbushandler.cpp
index ecee101..322c23d 100644
--- a/kio-magnet/dbushandler.cpp
+++ b/kio-magnet/dbushandler.cpp
@@ -262,7 +262,8 @@ void DBusHandler::load(const KUrl& u)
         if ( xt.isEmpty() || !xt.contains("urn:btih:") ) {
             QRegExp btihHash("([^\\.]+).btih");
             if ( btihHash.indexIn(u.host()) != -1 ) {
-                xt = "urn:btih:"+btihHash.cap(1);
+                QString primaryHash = btihHash.cap(1).split("-")[0];
+                xt = "urn:btih:"+primaryHash;
             }
         }
         if ( u.hasPath() && u.path() != "/" ) {

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic