Hello I'm making a Console app in VS15 using C#.
How can I decode torrent files? To get the Name, Size and Date of the torrent file? I want to donwload a torrent file from a server and then decode it to see the name, size and date. So far i can download a file using WebCLient, but i have search and search for how to decode a torrent file, but without luck.
I have tried this library and did this:
using (var fs = File.OpenRead("Ubuntu.torrent"))
{
BDictionary bdictionary = Bencode.DecodeDictionary(fs);
}
But i don't quite understand what bdictionary gives me? I want to output the torrents information in the console.
I have recently added functionality to work specifically with torrent files. So far it is very basic and just have properties for easy access to some of the info.
You should be able to extract the name and size of files like this:
For more information on the data stored in a
.torrent
have a look at the BitTorrentSpecification.