Open ghost opened 12 years ago
Probably. Magnet link support is based on PEX support though, which is not yet implemented in ttorrent mainline. But it's an interesting area I'll most likely get to working on in the near future, once I'm done with the announcing improvements and multi-tracker support.
I really like this library and I feel support of Magnet Links is really needed. I am studying BitTorrent Architecture and this library has helped me really understand it very well. Thanks and if possible do include magnet link support. Mainline DHT plugin for Vuze uses a lot of GUI and is not comfortable to understand.
Thanks! Magnet link support is definitely on the roadmap. I'm very busy with work these days, but I'm still looking at getting metadata exchange and magnet links working during the summer. Trackers are a dying breed anyway, so ttorrent needs to evolve with the times :)
It appears someone added DHT support a while ago, but it's based on an old version of the codebase so it may not be useful: https://github.com/AnDyXX/ttorrent
Either way I would love to see this feature, thanks for the great library.
Any update on the progress of magnet links? I have looked through the code, but haven't seen anything so far.
if implements Magnet Link in the best java torrent lib is very useful ttorrent's contributors please look as vision in this feature for make better ttrorrent
hi any progress on this issue ?
I'm up for working on this if I get time to go over the existing code base, and if @mpetazzoni has time to post/go over his plans for magnet link support.
Seems like frostwire/frostwire-jlibtorrent includes code to get a torrent file from a magnet link (demo):
So if I have a program that can take in magnet links at strings, I could use inter process communication (or just copy and paste) to pass the magnet link into - https://github.com/frostwire/frostwire-jlibtorrent/blob/master/src/com/frostwire/jlibtorrent/demo/GetMagnet.java - which will make and save to disk a .torrent file from that magnet link so that your library can download the appropriate file based on the content of that .torrent file? Have you tested it? Does it work?
Oh wait. You mean that if we want magnet link handling capabilities, we should use "frostwire-jlibtorrent" instead of the mpetazzoni's ttorrent library?
Any updates on this?
I´m interested in this too...
Why this feature request has been in stale for 2 years? I want this too. The jlibtorrent mentioned earlier uses JNI for the actual implementation, which affects the portability of the application (while it may be faster). That's why I prefer a pure Java library.
@lordscales91 I've been using jlibtorrent in my java torrent apps for a few years now, its really the best way to go. This library hasn't really been kept up too well, plus libtorrent is super performant and featured, and pretty much the main one used in all the open source torrent clients, jlibtorrent used for the android and java ones too.
EDIT: I get around the portability issue in my apps by just bundling the 3 binaries required for linux mac and windows in my jars, then choosing which one to load based on what java finds the OS to be. It does beef up the jar, but then you have one jar you can use across all desktop platforms.
@dessalines Thanks for your suggestion. I know this is a bit off topic but... Could you show me a working example of how to start a download from a magnet link? The example provided calls fetchMagnet
method which returns an array of byte data. But I don't know how to use it to start a download.
TorrentInfo ti = TorrentInfo.bdecode(bytes);
session.download(ti);
or just do
case TORRENT_ADDED:
TorrentAddedAlert a = (TorrentAddedAlert) alert;
log.info("Resuming torrent: " + a.torrentName());
a.handle().resume();
break;
@dessalines is there any chance you could help me get jlibtorrent working? I have downloaded dozens of dlls and dozens of versions of the jar and can't even get the demo working - always 'look for your architecture binary instructions'... I did try going back to basics and trying to build boost and libtorrent but it was too hard. I was here looking for an easier solution but all other Java libraries I found either don't do magnet links or don't have a demo :-( Please email me at thequantumcat@hotmail.com if you could help. I would be so grateful!
I would just open up a ticket over there.
It would be nice to allow the client to receive both .torrent files and magnet links as arguments in the main method. Is this likely in the near future?