Refresh, disk scan, and trigger auto-scan support and partial implementation for manual searches

This commit is contained in:
2023-08-08 10:50:05 -06:00
parent 69981857d8
commit 1ad1b16668
12 changed files with 426 additions and 75 deletions
+8 -1
View File
@@ -1,5 +1,6 @@
use std::io;
use std::sync::Arc;
use std::time::Duration;
use anyhow::Result;
use clap::Parser;
@@ -52,7 +53,13 @@ async fn main() -> Result<()> {
#[tokio::main]
async fn start_networking(mut network_rx: Receiver<NetworkEvent>, app: &Arc<Mutex<App>>) {
let network = Network::new(reqwest::Client::new(), app);
let network = Network::new(
reqwest::Client::builder()
.timeout(Duration::from_secs(45))
.build()
.unwrap(),
app,
);
while let Some(network_event) = network_rx.recv().await {
network.handle_network_event(network_event).await;