MonoTorrent magnet link download does not start
Asked Answered
P

0

11

I strongly believe that MonoTorrent library can do this, but it is probably due to the lack of documentation that I haven't been able to get it working.

To start with, MonoTorrent seems to be able to successfully download original torrents by using the following code: https://smuxi.im/wiki/monotorrent/Managing_Torrents

But due to the increase of Magnet Links popularity, I would like to get magnet links working as well. The "trick" of getting .torrent out of them (like using the ones that µTorrent generates) doesn't work for me either even when using the same code as above. It stays stuck like this, founding 1-3 peers per second but making no progress: MS-DOS

StackOverflow best question / answer at this topic was MonoTorrent - Magnet link to Torrent file but unfortunately the answer didn't even match MonoTorrent constructors which are the following:

public TorrentManager(Torrent torrent, string savePath, TorrentSettings settings);
public TorrentManager(MagnetLink magnetLink, string savePath, TorrentSettings settings, string torrentSave);
public TorrentManager(Torrent torrent, string savePath, TorrentSettings settings, string baseDirectory);
public TorrentManager(InfoHash infoHash, string savePath, TorrentSettings settings, string torrentSave, IList<RawTrackerTier> announces);

Finally I went to try some other code, apparently you need to need to either pass it a MagnetLink or InfoHash, so I gave it a go with InfoHash like the following:

ClientEngine engine;
TorrentManager manager;
string savePath;

public TorrentDownload(string savePath)
{
   this.engine = new ClientEngine(new EngineSettings());
   this.savePath = savePath;
}

public void DownloadMagnet(string hash)
{
    manager = new TorrentManager(InfoHash.FromHex(hash), savePath, new TorrentSettings(), savePath, new List<RawTrackerTier>());
    engine.Register(manager);
    manager.Start();
}

Am I missing something that my download doesn't even start? No errors / no crashes

Poultry answered 20/3, 2015 at 19:35 Comment(1)
@AaronSulwer It has been asked but the answer isn't helpful, as he said in the question...Fed

© 2022 - 2024 — McMap. All rights reserved.