Fix peers endpoint: use /api/v2/sync/torrentPeers instead of /api/v2/torrents/peers
This commit is contained in:
parent
b78e876e5a
commit
f4b3f20602
|
|
@ -369,7 +369,7 @@ impl QbittorrentClient {
|
||||||
/// Fetch peers for a given torrent hash.
|
/// Fetch peers for a given torrent hash.
|
||||||
pub async fn get_torrent_peers(&self, hash: &str) -> Result<Vec<Peer>> {
|
pub async fn get_torrent_peers(&self, hash: &str) -> Result<Vec<Peer>> {
|
||||||
self.require_auth()?;
|
self.require_auth()?;
|
||||||
let url = format!("{}/api/v2/torrents/peers?hash={}", self.base_url, hash);
|
let url = format!("{}/api/v2/sync/torrentPeers?hash={}&rid=0", self.base_url, hash);
|
||||||
let resp = self.client.get(&url).send().await?;
|
let resp = self.client.get(&url).send().await?;
|
||||||
|
|
||||||
if !resp.status().is_success() {
|
if !resp.status().is_success() {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue