diff --git a/shared/src/server_fns/torrent.rs b/shared/src/server_fns/torrent.rs index 26f4ecf..90f3dab 100644 --- a/shared/src/server_fns/torrent.rs +++ b/shared/src/server_fns/torrent.rs @@ -225,28 +225,22 @@ pub async fn set_file_priority( let ctx = expect_context::(); let client = RtorrentClient::new(&ctx.scgi_socket_path); - tracing::info!( - "set_file_priority: hash={}, file_index={}, priority={}", - hash, file_index, priority - ); - // rTorrent f.set_priority takes: target = "HASH:fINDEX", value = priority - // The target format for file commands is "HASH:f0", "HASH:f1", etc. let target = format!("{}:f{}", hash, file_index); let params = vec![ RpcParam::from(target.as_str()), RpcParam::from(priority as i64), ]; - let result = client.call("f.set_priority", ¶ms).await; - tracing::info!("f.set_priority result: {:?}", result); - result.map_err(|e| ServerFnError::new(format!("RPC error setting priority: {}", e)))?; + client + .call("f.set_priority", ¶ms) + .await + .map_err(|e| ServerFnError::new(format!("RPC error setting priority: {}", e)))?; // Notify rTorrent to update its internal priority state - let update_result = client + let _ = client .call("d.update_priorities", &[RpcParam::from(hash.as_str())]) .await; - tracing::info!("d.update_priorities result: {:?}", update_result); Ok(()) }