mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-01-12 15:57:57 +00:00
Merge pull request #5160 from ngosang/trackersfix
Fix Add tracker dialog bugs
This commit is contained in:
commit
7d0bdc2863
@ -53,13 +53,19 @@ TrackersAdditionDlg::TrackersAdditionDlg(BitTorrent::TorrentHandle *const torren
|
||||
|
||||
QStringList TrackersAdditionDlg::newTrackers() const
|
||||
{
|
||||
return trackers_list->toPlainText().trimmed().split("\n");
|
||||
QStringList cleanTrackers;
|
||||
foreach (QString url, trackers_list->toPlainText().split("\n")) {
|
||||
url = url.trimmed();
|
||||
if (!url.isEmpty())
|
||||
cleanTrackers << url;
|
||||
}
|
||||
return cleanTrackers;
|
||||
}
|
||||
|
||||
void TrackersAdditionDlg::on_uTorrentListButton_clicked()
|
||||
{
|
||||
uTorrentListButton->setEnabled(false);
|
||||
Net::DownloadHandler *handler = Net::DownloadManager::instance()->downloadUrl(QString("https://www.torrentz.com/announce_%1").arg(m_torrent->hash()), true);
|
||||
Net::DownloadHandler *handler = Net::DownloadManager::instance()->downloadUrl(list_url->text(), true);
|
||||
connect(handler, SIGNAL(downloadFinished(QString, QString)), this, SLOT(parseUTorrentList(QString, QString)));
|
||||
connect(handler, SIGNAL(downloadFailed(QString, QString)), this, SLOT(getTrackerError(QString, QString)));
|
||||
//Just to show that it takes times
|
||||
|
Loading…
Reference in New Issue
Block a user