Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.
Sign upHow to get the total content size of a .torrent file or a magnet link? #1317
Comments
This comment has been minimized.
This comment has been minimized.
|
Hey @Shai1436, Your best choice would be to parse the torrent with parse-torrent and then use the .length property though this would only work for a .torrent file. Since magnetURI don't contain the metadata, you would have to first find the metadata from a peer before you would know the length, you could use torrent-discovery. Hope this helps! |
How to get the total content size of a .torrent file or a magnet link without adding it to a client?
We can add the link to the client, get the total size and remove it from the client. (But it won't delete the file in the temporary folder).
Isn't there a better way to do this? Thanks!