BEncode.net urllist is null

154 Views Asked by At

I want get values from url-list from tracker-less torrent with just web seeds.

I writed this

     TorrentFile torrent = Bencode.DecodeTorrentFile("tr.torrent");
     BList urllist = (Blist)torrent["url-list"];

but this don't work because urllist is null. How to get url-list ?

1

There are 1 best solutions below

5
On

Have you used the debugger to investigate what's in the torrent variable after you do the following? There's probably tons on data in there if you set a breakpoint on your second line... The debugger is your friend.

TorrentFile torrent = Bencode.DecodeTorrentFile("tr.torrent");

Also, do you mean the trackers?
Look here: https://github.com/Krusen/BencodeNET

you might just want what's in

BList announceList = torrent["announce-list"];