frostwire / frostwire-jlibtorrent

A swig Java interface for libtorrent by the makers of FrostWire. Develop libtorrent based apps with the joy of coding in Java.
http://www.frostwire.com
MIT License
451 stars 138 forks source link

Trackers List is Empty if torrent is added using magnet uri. #128

Closed mianharisali closed 7 years ago

mianharisali commented 7 years ago

i am trying to get trackers , but when we add torrent using magnet uri , the trackers list comes empty.

aldenml commented 7 years ago

I will test this

aldenml commented 7 years ago

If you try this code, aren't you able to get the trackers?

add_torrent_params p = add_torrent_params.create_instance_disabled_storage();
error_code ec = new error_code();
libtorrent.parse_magnet_uri(uri, p, ec);
mianharisali commented 7 years ago

i will try this code , but the torrent is being downloaded(added via magnet) in a session i think it should give tracker list using th.trackers();

aldenml commented 7 years ago

I tested the feature and I can confirm that TorrentHandle#trackers() works as expected. I will close the issue but if you put some code to reproduce the problem, I can take a look at it.

mianharisali commented 7 years ago

@aldenml just a noob question , can this be due to trackerless torrent?

aldenml commented 7 years ago

has the magnet link tracker parameters (&tr=<url>)? I think trackless torrent is just a way to say that the peers are discovered only via DHT (and they don't have a list of trackers to discover the swarm).