Closed Sonic3R closed 4 years ago
I have
var file = @"C:\....\test.torrent"; var parser = new BencodeParser(); Torrent torrent = parser.Parse<Torrent>(file); torrent.Comment = ""; torrent.CreatedBy = ""; torrent.CreationDate = DateTime.Now; torrent.IsPrivate = true; var list = new List<IList<string>>(); list.Add(new List<string> { "https://mytracker.org" }); torrent.Trackers = list;
How to save back to test.torrent file ?
test.torrent
using (var stream = File.OpenWrite("path.to.torrent")) { // Async await torrent.EncodeToAsync(stream); // Sync torrent.EncodeTo(stream); }
I got it, thanks.
I have
How to save back to
test.torrent
file ?