Beispiel #1
0
        public TorrentInfo GetTorrentInfo(string hash)
        {
            EnsureLoggedInAsync().Wait();
            var torrentQuery = new TorrentListQuery()
            {
                Hashes = new string[] { hash }
            };

            return(_client.GetTorrentListAsync(torrentQuery).Result.FirstOrDefault());
        }
Beispiel #2
0
        public int GetTorrentCanAddCount()
        {
            EnsureLoggedInAsync().Wait();
            var query = new TorrentListQuery()
            {
                Category = _qbittorrentSetting.Category
            };

            return(_qbittorrentSetting.MaxDownloadCount - _client.GetTorrentListAsync(query).Result.Count);
        }