aldenml / libtorrent4j

libtorrent for java, a swig Java interface for libtorrent
http://libtorrent4j.org
Other
202 stars 31 forks source link

fetchMagnet(String uri, int timeout, File tempDir) method can't save the torrent file #268

Open gongming21 opened 2 weeks ago

gongming21 commented 2 weeks ago

byte[] data = s.fetchMagnet(uri, 30, file); TorrentInfo torrentInfo = new TorrentInfo(data);

the torrent can read something but i can't find the torrent in the file

i want to know it's my problem or the method problem a8a6f7be98c1f186c67c3318ba293b0f baeb67621fbd565fe06cc2389dffc875

aldenml commented 2 weeks ago

can you replicate the issue with this https://github.com/aldenml/libtorrent4j/blob/master/src/test/java/org/libtorrent4j/demo/GetMagnet.java ?

gongming21 commented 2 weeks ago

can you replicate the issue with this https://github.com/aldenml/libtorrent4j/blob/master/src/test/java/org/libtorrent4j/demo/GetMagnet.java ? 3a928d2b2465e75176d6d1215615b57c ccc3a91b154c91183fd534774343c3b6 still can't save the torrent,and i have a question,why console print "DHT bootstrap timeout",but i still get the torrentEntry? it's necessary to exit program or do something when nodes <= 10 but nodes >0? o i know i should cancel the timer when timeout but nodes <= 10

9f6ad511841ae337dd75f3febcc0b295 this time contains 1 dht at first,when fetching the magnet uri contains 0,but i still get torrentEntry,so it' depend on have get once dht connection rather than when fetching magnet uri contains nodes?