Open paulmortlock opened 1 month ago
Pass ITorrentManagerFile to SetFilePriorityAsync()
await torrentManager.SetFilePriorityAsync(torrentManager.Files[0], Priority.DoNotDownload);
That does not make sense to me show me please if there is also a way to do this without using foreach as it is slow when 14K files are present.
This is better but I have 87K files.
var tasks = manager.Files
.Where(files => !StartsWithStrings.Any(prefix => files.Path.StartsWith(prefix)) ||
!ContainsStrings.Any(prefix => files.Path.Contains(prefix)))
.Select(async files =>
{
await manager.SetFilePriorityAsync(files, Priority.DoNotDownload);
n2--;
});
await Task.WhenAll(tasks);
I saw an example on the wiki but this does not work.