-
Notifications
You must be signed in to change notification settings - Fork 14
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
Adding support for magnet link generation #11
Comments
Glad to hear it's useful for you! Magnet support sounds great, I'm happy to
see that as a PR.
Your comment reminded me about something you may want to address when
writing this PR: the encoder alphabetically orders Map keys when encoding
but the parser doesn't validate that bencoded dicts have alphabetical keys
when parsing. This means the hash of a torrent file with unsorted dict keys
will not equal the hash of decoding and reencoding that torrent with Bento.
It's my understanding that magnet links address content by hash value, so
this could cause two separate links for what is effectively the same
content.
Since the bencode spec requires that dict keys be alphabetically ordered,
you'll only come across this issue if you're working with noncompliant
torrent files. If the files you work with are all spec-compliant, or if you
don't care about the above issue, don't worry about it :)
Happy holidays!
…On Sun, Dec 24, 2017, 10:19 Théophile Choutri ***@***.***> wrote:
Hi! I'm already using Bento to parse torrent files, and I would like to
know if you'd accept a PR that implements magnet link generation from a
torrent file.
Happy holidays :)
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#11>, or mute the thread
<https://github.com/notifications/unsubscribe-auth/AASREfyOgjMIHuVFTOOJ096I4CIdnuYsks5tDmt2gaJpZM4RL8zK>
.
|
@folz Okay, I'm almost done implementing it. Before I open a PR, do you have any opinion about the API I should provide? I understand that I should provide a Thanks for your support. :) |
Yep, like Thanks for working on this. I'm looking forward to the PR! |
Was this ever submitted? |
No, it wasn't. If you want to submit a PR, or if @tchoutri is interested in finding their old work, I'd be happy to get it merged in. |
Unfortunately I have lost said work. :/ |
No worries :) just figured I'd ask. |
My plan is to use c libtorrent wrapped via Unifex to support the webtorrent protocol, however that's not this library. Thanks for all the replies. |
Hi! I'm already using Bento to parse torrent files, and I would like to know if you'd accept a PR that implements magnet link generation from a torrent file.
Happy holidays :)
The text was updated successfully, but these errors were encountered: