mirror of
https://github.com/YGGverse/aquatic-crawler.git
synced 2026-03-31 17:15:35 +00:00
remove torrent from session only if the enable_upload config option disabled
This commit is contained in:
parent
bae3febced
commit
1c631c23da
1 changed files with 6 additions and 4 deletions
|
|
@ -190,10 +190,12 @@ async fn main() -> Result<()> {
|
||||||
keep_files.len()
|
keep_files.len()
|
||||||
);
|
);
|
||||||
preload.commit(&i, bytes, Some(keep_files))?;
|
preload.commit(&i, bytes, Some(keep_files))?;
|
||||||
// remove torrent from session as indexed
|
// remove torrent from the session as indexed
|
||||||
|
if !config.enable_upload {
|
||||||
session
|
session
|
||||||
.delete(librqbit::api::TorrentIdOrHash::Id(id), false)
|
.delete(librqbit::api::TorrentIdOrHash::Id(id), false)
|
||||||
.await?;
|
.await?;
|
||||||
|
}
|
||||||
log::debug!("torrent `{i}` resolved.")
|
log::debug!("torrent `{i}` resolved.")
|
||||||
}
|
}
|
||||||
Ok(_) => panic!(),
|
Ok(_) => panic!(),
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue