From cc002a4ed38c40931c294580153c12e10d453419 Mon Sep 17 00:00:00 2001 From: Igor Katson Date: Thu, 7 Nov 2024 15:19:11 +0000 Subject: [PATCH] Fix initial peers for HTTP client --- crates/librqbit/src/http_api_client.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/crates/librqbit/src/http_api_client.rs b/crates/librqbit/src/http_api_client.rs index 4414afa3..24f9a936 100644 --- a/crates/librqbit/src/http_api_client.rs +++ b/crates/librqbit/src/http_api_client.rs @@ -4,7 +4,7 @@ use serde::Deserialize; use crate::{ api::ApiAddTorrentResponse, - http_api::TorrentAddQueryParams, + http_api::{InitialPeers, TorrentAddQueryParams}, session::{AddTorrent, AddTorrentOptions}, }; @@ -99,6 +99,7 @@ impl HttpApiClient { output_folder: opts.output_folder, sub_folder: opts.sub_folder, list_only: Some(opts.list_only), + initial_peers: opts.initial_peers.map(InitialPeers), ..Default::default() }; let qs = serde_urlencoded::to_string(¶ms).unwrap();