Fix initial peers for HTTP client

This commit is contained in:
Igor Katson 2024-11-07 15:19:11 +00:00
parent c2b2e8e8e7
commit cc002a4ed3
No known key found for this signature in database
GPG key ID: B4EC22B66D61A3F5

View file

@ -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(&params).unwrap();