Now actually downloads 2 files at a time
This commit is contained in:
parent
ba87529419
commit
2ac76683e6
2 changed files with 12 additions and 11 deletions
|
|
@ -155,14 +155,6 @@ async fn async_main(opts: Opts, spawner: BlockingSpawner) -> anyhow::Result<()>
|
|||
.context("error initializing rqbit session")?,
|
||||
);
|
||||
|
||||
{
|
||||
let http_api = HttpApi::new(session.clone());
|
||||
spawn("HTTP API", {
|
||||
let http_api_listen_addr = opts.http_api_listen_addr;
|
||||
async move { http_api.make_http_api_and_run(http_api_listen_addr).await }
|
||||
});
|
||||
};
|
||||
|
||||
let torrent_opts = AddTorrentOptions {
|
||||
only_files_regex: opts.only_files_matching_regex,
|
||||
overwrite: opts.overwrite,
|
||||
|
|
@ -180,6 +172,15 @@ async fn async_main(opts: Opts, spawner: BlockingSpawner) -> anyhow::Result<()>
|
|||
None => return Ok(()),
|
||||
};
|
||||
|
||||
{
|
||||
let http_api = HttpApi::new(session.clone());
|
||||
http_api.add_mgr(handle.clone());
|
||||
spawn("HTTP API", {
|
||||
let http_api_listen_addr = opts.http_api_listen_addr;
|
||||
async move { http_api.make_http_api_and_run(http_api_listen_addr).await }
|
||||
});
|
||||
};
|
||||
|
||||
spawn("Stats printer", {
|
||||
let handle = handle.clone();
|
||||
async move {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue