mirror of
https://github.com/YGGverse/aquatic-crawler.git
synced 2026-03-31 17:15:35 +00:00
take bytes
This commit is contained in:
parent
3e053fa806
commit
e2d2b513cc
2 changed files with 2 additions and 2 deletions
|
|
@ -169,7 +169,7 @@ async fn main() -> Result<()> {
|
||||||
mt.wait_until_completed().await?;
|
mt.wait_until_completed().await?;
|
||||||
// persist torrent bytes and preloaded content,
|
// persist torrent bytes and preloaded content,
|
||||||
// cleanup tmp (see rqbit#408)
|
// 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
|
// remove torrent from session as indexed
|
||||||
session
|
session
|
||||||
.delete(librqbit::api::TorrentIdOrHash::Id(id), false)
|
.delete(librqbit::api::TorrentIdOrHash::Id(id), false)
|
||||||
|
|
|
||||||
|
|
@ -35,7 +35,7 @@ impl Preload {
|
||||||
pub fn commit(
|
pub fn commit(
|
||||||
&self,
|
&self,
|
||||||
info_hash: &str,
|
info_hash: &str,
|
||||||
torrent_bytes: &[u8],
|
torrent_bytes: Vec<u8>,
|
||||||
persist_files: Option<HashSet<PathBuf>>,
|
persist_files: Option<HashSet<PathBuf>>,
|
||||||
) -> Result<()> {
|
) -> Result<()> {
|
||||||
// persist torrent bytes to file
|
// persist torrent bytes to file
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue