Vote count:
0
I'm trying to download a .torrent with frostwire-jlibtorrent library. I copy the sources directly in my project source folder like https://github.com/frostwire/frostwire-jlibtorrent says and I did a simple Activity to run it on a phone. I have no errors doing that but the download never starts. I used the example code from github frostwire and nothing.
I don't understand what I'm doing wrong. The source code is this:
File torrentFile = new File("/sdcard/torr.torrent");
System.out.println("Using libtorrent version: " + LibTorrent.version());
final Session s = new Session();
final TorrentHandle th = s.addTorrent(torrentFile, torrentFile.getParentFile());
final CountDownLatch signal = new CountDownLatch(1);
s.addListener(new TorrentAlertAdapter(th) {
@Override
public void onBlockFinished(BlockFinishedAlert alert) {
int p = (int) (th.getStatus().getProgress() * 100);
System.out.println("Progress: " + p);
}
@Override
public void onTorrentFinished(TorrentFinishedAlert alert) {
System.out.print("Torrent finished");
signal.countDown();
}
});
th.resume();
signal.await();
I can see the torrent data, like name or the files inside it but I can't download it.
Please help I really need it :/
asked 25 secs ago
Android torrent downloader
Aucun commentaire:
Enregistrer un commentaire