0

我正在尝试使用 C# 创建一个带有 monotorrent 包的 torrent 文件。

我已经使用 torrent 创建器创建了 torrent 文件,但我想添加一些在 torrent 创建器方法或属性中找不到的其他选项。

我正在寻找的选项:

  • 添加跟踪网址(S),
  • 网络种子 URL(S),
  • 资源,
  • 优化对齐。

这是我的代码片段:

string filepath = ofd.FileName;
PathDirectoryTxt.Text = filepath;
MonoTorrent.Common.TorrentCreator torrentcreaotr = new MonoTorrent.Common.TorrentCreator();
ITorrentFileSource fileSource = new TorrentFileSource(filepath);
torrentcreaotr.Comment = CommentsRichTxt.Text;
torrentcreaotr.CreatedBy = "Google using " + VersionInfo.ClientVersion;
torrentcreaotr.Publisher = "www.itsitus.com";
if ((PrivateTorrentCheckbox.Checked))
{
    torrentcreaotr.Private = true;
}
else if (!PrivateTorrentCheckbox.Checked)
{
    torrentcreaotr.Private = false;
}

string savepath = sfd.FileName;

torrentcreaotr.Create(fileSource, savepath);
MessageBox.Show("torrent file has been created successfully !");
4

1 回答 1

0

您是否尝试过使用跟踪器的 URL 设置“公告”属性,或者如果您有跟踪器层/后备,则设置“公告”?同样,使用 GetrightHttpSeed 属性设置 Webseed。

于 2019-08-11T16:52:51.273 回答