我正在使用monotorrent,我想知道是否可以添加跟踪器,以加快下载速度。不幸的是,MonoTorrent缺乏文档,所以非常感谢帮助。
我正在使用的代码下载(c#):
private void downloadTorrent()
{
infoLabel5.Text = "Torrent downloading, please wait. Don't close AutoDow!";
infoLabel5.ForeColor = Color.Black;
browserProgress.Value = 0;
EngineSettings settings = new EngineSettings();
settings.AllowedEncryption = EncryptionTypes.All;
settings.SavePath = @"E:\AutoDow\series\" + series;
ClientEngine engine = new ClientEngine(settings);
Torrent torrent = Torrent.Load(@"E:\AutoDow\torrents\" + series + @"\" + series + downloadTorrentCount + ".torrent");
TorrentManager manager = new TorrentManager(torrent, engine.Settings.SavePath, new TorrentSettings());
engine.Register(manager);
manager.PieceHashed += new EventHandler<PieceHashedEventArgs>(updateProgress);
manager.Start();
manager.TorrentStateChanged += new EventHandler<TorrentStateChangedEventArgs>(handleTorrentStateChanged);
}
答案 0 :(得分:0)
您可以像BEncodedDictionary
这样获得种子信息:
BEncodedDictionary dict = (BEncodedDictionary)BEncodedDictionary.Decode(File.ReadAllBytes("path_to_torrent_file"));
然后将项目添加到密钥通知列表
并从该字典中创建Torrent。