public TorrentInfo GetTorrentInfo(string hash) { EnsureLoggedInAsync().Wait(); var torrentQuery = new TorrentListQuery() { Hashes = new string[] { hash } }; return(_client.GetTorrentListAsync(torrentQuery).Result.FirstOrDefault()); }
public int GetTorrentCanAddCount() { EnsureLoggedInAsync().Wait(); var query = new TorrentListQuery() { Category = _qbittorrentSetting.Category }; return(_qbittorrentSetting.MaxDownloadCount - _client.GetTorrentListAsync(query).Result.Count); }