You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The GetMagnetLink recalculates the InfoHash, but the recalculated InfoHash is different from the OriginalInfoHash that was calculated on initial loading of the file, and so the magnet has a different urn.
OriginalInfoHash is (correctly) 91d66f363d2f603e336b34493d10fe63f7740251
(or something similar, BencodeNET doesn't support url-lists/ws= , but it isn't a problem. It is a feature used only by very few servers like archive.org)
The text was updated successfully, but these errors were encountered:
This is because the Torrent class is just a quick solution originally made mainly for help with creating torrents. Some limited parsing of torrent files was added as well, but it doesn't load in all original fields from the torrent, so some can be missing when then info hash is then recalculated - in this instance specifically fields crc32, md5, sha1 and mtime on every entry in info.files dictinoary.
I'm unlikely to be updating the torrent parsing functionality any time soon. Ideally the Torrent class would just work on top of a BDictionary directly, that way all fields would be there from the original torrent file.
The GetMagnetLink recalculates the InfoHash, but the recalculated InfoHash is different from the OriginalInfoHash that was calculated on initial loading of the file, and so the magnet has a different urn.
The torrent is from https://archive.org/details/equestriagirlsdashforthecrown and is https://archive.org/download/equestriagirlsdashforthecrown/equestriagirlsdashforthecrown_archive.torrent (but I have the same problem with other torrents).
I'm using .NET Core 7.0
The result I obtain:
magnet:?xt=urn:btih:d02d19163df7ab5c835d84f0a0b1f9bd4c32d239&dn=equestriagirlsdashforthecrown&tr=http%3A%2F%2Fbt1.archive.org%3A6969%2Fannounce&tr=http%3A%2F%2Fbt2.archive.org%3A6969%2Fannounce
The expected result:
magnet:?xt=urn:btih:91d66f363d2f603e336b34493d10fe63f7740251&dn=equestriagirlsdashforthecrown&tr=http%3a%2f%2fbt1.archive.org%3a6969%2fannounce&tr=http%3a%2f%2fbt2.archive.org%3a6969%2fannounce&ws=http%3a%2f%2fia802702.us.archive.org%2f18%2fitems%2f&ws=http%3a%2f%2fia902702.us.archive.org%2f18%2fitems%2f&ws=https%3a%2f%2farchive.org%2fdownload%2f
OriginalInfoHash is (correctly) 91d66f363d2f603e336b34493d10fe63f7740251
(or something similar, BencodeNET doesn't support url-lists/ws= , but it isn't a problem. It is a feature used only by very few servers like archive.org)
The text was updated successfully, but these errors were encountered: