-
Notifications
You must be signed in to change notification settings - Fork 382
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] Something dCan the project run directly? What I need is to get the metadata according to infohashoes not work as it should #195
Comments
Hi, What version are you using? Are you trying to download just the metadata file, or the entire torrent? What exact error are you getting? I just fixed a minor bug that broke magnet link downloads in the latest snapshot. #196 I will merge it once the CI passes. |
At present, I only have infohash and hostname. port 。 Now I want to get the corresponding metadata. Which method do you need? |
1 similar comment
At present, I only have infohash and hostname. port 。 Now I want to get the corresponding metadata. Which method do you need? |
Hi, I think you'll need to write a bit of java code to do this. First, create a torrent context with a Magnet URI. Some examples on how to do this:
If the hostname/port you have are for a tracker, then you'll need to add it to the magnet URI. If the hostname/port you have are of a peer, the easiest way to bootstrap this peer is with a mock tracker. See: https://github.com/atomashpolskiy/bt/blob/master/examples/src/main/java/yourip/mock/MockTracker.java When you build a torrent context, there is a callback for when the torrent is fetched:
You can write a callback method that writes the torrent to disk, and then stops the torrent. @atomashpolskiy - perhaps this might be a good feature to have? When metadata is downloaded from a magnet link, have an option to persist it to disk. |
Can the project run directly? What I need is to get the metadata according to infohash
The text was updated successfully, but these errors were encountered: