diff --git a/src/main.rs b/src/main.rs index a6cc967..776c40a 100644 --- a/src/main.rs +++ b/src/main.rs @@ -169,7 +169,7 @@ async fn main() -> Result<()> { mt.wait_until_completed().await?; // persist torrent bytes and preloaded content, // cleanup tmp (see rqbit#408) - preload.commit(&i, &bytes, Some(keep_files))?; + preload.commit(&i, bytes, Some(keep_files))?; // remove torrent from session as indexed session .delete(librqbit::api::TorrentIdOrHash::Id(id), false) diff --git a/src/preload.rs b/src/preload.rs index ebf5e37..86efa2e 100644 --- a/src/preload.rs +++ b/src/preload.rs @@ -35,7 +35,7 @@ impl Preload { pub fn commit( &self, info_hash: &str, - torrent_bytes: &[u8], + torrent_bytes: Vec, persist_files: Option>, ) -> Result<()> { // persist torrent bytes to file