diff --git a/Source/RatioMaster/RM.Designer.cs b/Source/RatioMaster/RM.Designer.cs index 87eaac1..6c2dd10 100644 --- a/Source/RatioMaster/RM.Designer.cs +++ b/Source/RatioMaster/RM.Designer.cs @@ -769,7 +769,8 @@ internal void InitializeComponent() "BitSpirit", "Deluge", "KTorrent", - "Gnome BT"}); + "Gnome BT", + "qBittorrent"}); this.cmbClient.Location = new System.Drawing.Point(197, 20); this.cmbClient.Name = "cmbClient"; this.cmbClient.Size = new System.Drawing.Size(139, 21); diff --git a/Source/RatioMaster/RM.cs b/Source/RatioMaster/RM.cs index 947d940..9590bfc 100644 --- a/Source/RatioMaster/RM.cs +++ b/Source/RatioMaster/RM.cs @@ -527,6 +527,14 @@ internal void cmbClient_SelectedIndexChanged(object sender, EventArgs e) break; } + case "qBittorrent": + { + cmbVersion.Items.Add("5.1.2"); + cmbVersion.SelectedItem = "5.1.2"; + if (customPeersNum.Text == "0" || customPeersNum.Text == "") customPeersNum.Text = "200"; + break; + } + default: { cmbClient.SelectedItem = DefaultClient; diff --git a/Source/RatioMaster/TorrentClientFactory.cs b/Source/RatioMaster/TorrentClientFactory.cs index 9c9e6bd..b8754e6 100644 --- a/Source/RatioMaster/TorrentClientFactory.cs +++ b/Source/RatioMaster/TorrentClientFactory.cs @@ -719,6 +719,25 @@ public static TorrentClient GetClient(string name) break; } #endregion + #region qBittorrent + case "qBittorrent 5.1.2": + { + client.Name = "qBittorrent 5.1.2"; + client.HttpProtocol = "HTTP/1.1"; + client.HashUpperCase = false; + client.Key = GenerateIdString("hex", 8, false, true); + client.Headers = "User-Agent: qBittorrent/5.1.2\r\nAccept-Encoding: gzip\r\nAccept: */*\r\nHost: {host}\r\nConnection: close\n\r"; + client.PeerID = "-qB5120-" + GenerateIdString("random", 12, false, false); + client.Query = "info_hash={infohash}&peer_id={peerid}&port={port}&uploaded={uploaded}&downloaded={downloaded}&left={left}&corrupt=0&key={key}{event}&numwant={numwant}&compact=1&no_peer_id=1&supportcrypto=1&redundant=0"; + client.DefNumWant = 200; + client.Parse = true; + client.SearchString = "&peer_id=-qB5120-"; + client.ProcessName = "qbittorent"; + client.StartOffset = 0; + client.MaxOffset = 100000000; + break; + } + #endregion default: { client.Name = "uTorrent 3.3.2";