private void download(BinTorrent bt) { var info = new BinRootInfo(binRepository.Root, bt); var m = torrentEnvironment.PrepareManager(info); m.TorrentStateChanged += onTorrentStateChanged; m.Start(); }
public void Put(BinTorrent bt) { var targetPath = Path.Combine(Path.Combine(bt.Publisher, bt.Product), bt.Version); ensureDirectory(targetPath); using (var fs = File.OpenWrite(rootedPath(targetPath, "this.torrent"))) bt.StoreTo(fs); }
public BinRootInfo(string basePath, BinTorrent torrent) { this.basePath = basePath; this.torrent = torrent; relativePath = torrent.Publisher + "\\" + torrent.Product + "\\" + torrent.Version; }