Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

How to download only one file from large torrent #21

Open
Hippey opened this Issue · 0 comments

1 participant

@Hippey

Hello!

How to download only one file from large torrent?

I tried this code:

string allowed = "test.exe";

Torrent torrent = Torrent.Load(TorrentFile.FullName);

for (int i = 0; i < torrent.Files.Length; i++)
{
if (!torrent.Files[i].Path.Contains(allowed))
{
torrent.Files[i].Priority = Priority.DoNotDownload;
}
else
{
torrent.Files[i].Priority = Priority.Highest;
}
}

But with this code monotorrent whatever downloads all files.

How to fix that?

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.