diff --git a/src/stremio_app/updater.rs b/src/stremio_app/updater.rs index 3d0422a..e369ef2 100644 --- a/src/stremio_app/updater.rs +++ b/src/stremio_app/updater.rs @@ -84,21 +84,22 @@ impl Updater { } println!("Found update v{}", version); - // Download the new setup file - let mut installer_response = reqwest::blocking::get(installer.url.clone())?; - let size = installer_response.content_length(); - let mut downloaded: u64 = 0; - let mut sha256 = Sha256::new(); - let temp_dir = std::env::temp_dir(); let file_name = std::path::Path::new(installer.url.path()) .file_name() .context("Invalid file name")? .to_str() .context("The path is not valid UTF-8")? .to_string(); - + let temp_dir = std::env::temp_dir(); let dest = temp_dir.join(file_name); + std::thread::sleep(std::time::Duration::from_secs(2)); + // Download the new setup file + let mut installer_response = reqwest::blocking::get(installer.url.clone())?; + let size = installer_response.content_length(); + let mut downloaded: u64 = 0; + let mut sha256 = Sha256::new(); + println!("Downloading {} to {}", installer.url, dest.display()); let mut chunk = [0u8; 8192];