mirror of
https://github.com/Drop-OSS/drop-app
synced 2026-08-27 22:23:04 -04:00
better download defaults
This commit is contained in:
parent
5ed0833e61
commit
4779383fc9
2 changed files with 4 additions and 4 deletions
|
|
@ -34,7 +34,8 @@ pub fn download_game_chunk(ctx: DropDownloadContext) {
|
|||
.expect("Failed to seek to file offset");
|
||||
}
|
||||
|
||||
let mut stream = BufWriter::with_capacity(1024, file_lock.try_clone().unwrap());
|
||||
let mut stream = BufWriter::with_capacity(1024 * 1024, file_lock.try_clone().unwrap());
|
||||
drop(file_lock);
|
||||
|
||||
response.copy_to(&mut stream).unwrap();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -64,6 +64,7 @@ impl GameDownloadManager {
|
|||
}
|
||||
self.ensure_manifest_exists().await
|
||||
}
|
||||
|
||||
pub fn begin_download(
|
||||
&self,
|
||||
max_threads: usize,
|
||||
|
|
@ -76,6 +77,7 @@ impl GameDownloadManager {
|
|||
progress.run_contexts_parallel(contexts, max_threads);
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub async fn ensure_manifest_exists(&self) -> Result<(), GameDownloadError> {
|
||||
if self.manifest.lock().unwrap().is_some() {
|
||||
return Ok(());
|
||||
|
|
@ -145,9 +147,6 @@ pub fn generate_job_contexts(
|
|||
let mut running_offset = 0;
|
||||
|
||||
for i in 0..chunk.ids.len() {
|
||||
if i == 1 {
|
||||
info!("woah a chunk bigger than 1")
|
||||
}
|
||||
contexts.push(DropDownloadContext {
|
||||
file_name: raw_path.to_string(),
|
||||
version: version.to_string(),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue