From 025f4f9737680940fa2e5fca9981439a50e27d46 Mon Sep 17 00:00:00 2001 From: Nick Tiskov Date: Sun, 3 Mar 2013 17:22:11 +0400 Subject: [PATCH] Support tracker mirrors in torrent creator --- src/torrentcreator/torrentcreatorthread.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/torrentcreator/torrentcreatorthread.cpp b/src/torrentcreator/torrentcreatorthread.cpp index 6bbaa8472..2179def46 100644 --- a/src/torrentcreator/torrentcreatorthread.cpp +++ b/src/torrentcreator/torrentcreatorthread.cpp @@ -113,8 +113,13 @@ void TorrentCreatorThread::run() { foreach (const QString &seed, url_seeds) { t.add_url_seed(seed.trimmed().toStdString()); } + qint32 tier = 0; foreach (const QString &tracker, trackers) { - t.add_tracker(tracker.trimmed().toStdString()); + if (tracker.isEmpty()) { + ++tier; + continue; + } + t.add_tracker(tracker.trimmed().toStdString(), tier); } if (abort) return; // calculate the hash for all pieces