Me Online
Me Online

Reputation: 1

Creation of torrent using monotorrent

I am trying to create a torrent file with monotorrent package using C#.

I already created the torrent file with the torrent creator but I want to add some other options that I can't find in the torrent creator methods or properties.

Options that I am looking for :

Here is a snippet of my code:

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 !");

Upvotes: 0

Views: 652

Answers (1)

Alan
Alan

Reputation: 409

Have you tried setting the 'Announce' property with the URL for your tracker, or setting the 'Announces' if you have tracker tiers/fallbacks? Similarly, Webseeds are set using the GetrightHttpSeed property.

Upvotes: 0

Related Questions