We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4bfa760 commit ffc6e44Copy full SHA for ffc6e44
src/qbittorrent/api.rs
@@ -165,6 +165,17 @@ impl QBittorrentClient {
165
.find(|torrent| target.matches_hash(torrent.as_ref()))
166
})
167
}
168
+
169
+ pub async fn set_location(&self, target: &SingleTarget, location: &str) -> Result<(), Error> {
170
+ if let Some(id) = self.id(target).await? {
171
+ let form = Form::new().text("hashes", id.to_string()).text("location", location.to_string());
172
+ self._post_multipart(self._endpoint("torrents/setLocation"), form).await?;
173
174
+ Ok(())
175
+ } else {
176
+ Err(Error::MissingTorrent { hash: target.to_string() })
177
+ }
178
179
180
181
#[async_trait]
0 commit comments