Fix URL decoding in search engine

This commit is contained in:
Christophe Dumez 2011-04-11 16:21:07 +00:00
parent fd8157f6ba
commit 851a677a48
3 changed files with 4 additions and 4 deletions

View file

@ -2,7 +2,7 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
# #
#VERSION: 1.00 #VERSION: 1.1
#AUTHORS: BTDigg team (research@btdigg.org) #AUTHORS: BTDigg team (research@btdigg.org)
# #
# GNU GENERAL PUBLIC LICENSE # GNU GENERAL PUBLIC LICENSE
@ -52,7 +52,7 @@ class btdigg(object):
seeds = int(dl), seeds = int(dl),
leech = int(dl), leech = int(dl),
engine_url = self.url, engine_url = self.url,
desc_link = 'http://btdigg.org/search?%s' % (urllib.urlencode(dict(info_hash = info_hash)),)) desc_link = 'http://btdigg.org/search?%s' % (urllib.urlencode(dict(info_hash = info_hash, q = req)),))
prettyPrinter(res) prettyPrinter(res)
finally: finally:

View file

@ -7,4 +7,4 @@ vertor: 1.3
torrentdownloads: 1.1 torrentdownloads: 1.1
extratorrent: 1.1 extratorrent: 1.1
kickasstorrents: 1.2 kickasstorrents: 1.2
btdigg: 1.00 btdigg: 1.1

View file

@ -729,7 +729,7 @@ void SearchEngine::on_goToDescBtn_clicked()
QSortFilterProxyModel* model = all_tab.at(tabWidget->currentIndex())->getCurrentSearchListProxy(); QSortFilterProxyModel* model = all_tab.at(tabWidget->currentIndex())->getCurrentSearchListProxy();
const QString desc_url = model->data(model->index(index.row(), DESC_LINK)).toString(); const QString desc_url = model->data(model->index(index.row(), DESC_LINK)).toString();
if(!desc_url.isEmpty()) if(!desc_url.isEmpty())
QDesktopServices::openUrl(QUrl(desc_url)); QDesktopServices::openUrl(QUrl::fromEncoded(desc_url.toUtf8()));
} }
} }
} }