Closed Sleepyowl closed 7 years ago
Version 2.2.9 is out on NuGet and allows you to specify a parse mode - TorrentParserMode.Strict
or TorrentParserMode.Tolerant
.
TorrentParserMode.Tolerant
will skip all checks for required fields and just parse whatever it can.
You can change the mode like this:
var parser = new BencodeParser();
parser.Parsers.GetSpecific<TorrentParser>().ParseMode = TorrentParserMode.Tolerant;
Accessing a specific parser is not very pretty as it is made to be very generic. I will probably change this in the future for a possible version 3.0.
I've got a torrent file that has both "length" and "files" fields in the info dictionary.
I do realise that it's a clear violation of BEP3 that states:
But unfortunately torrents like that do exist and qBittorrent opens then without errors or warnings.
If you don't want to ignore this error in torrent's metadata, how about adding a "forgiving" parser option?
Please find the example of malformed torrent in the attachment.
B98382409D888F8F9C6F1CBACD8E62BEC46FC8EE.zip