mirror of
https://github.com/an-anime-team/sleepy-launcher.git
synced 2024-11-24 13:49:34 +03:00
fix: (potentially) fixed a bug with pre-download button
This commit is contained in:
parent
c6eb063973
commit
dd85f1b6d3
2 changed files with 16 additions and 14 deletions
6
Cargo.lock
generated
6
Cargo.lock
generated
|
@ -57,7 +57,8 @@ checksum = "5c6cb57a04249c6480766f7f7cef5467412af1490f8d1e243141daddada3264f"
|
|||
|
||||
[[package]]
|
||||
name = "anime-game-core"
|
||||
version = "1.22.2"
|
||||
version = "1.23.0"
|
||||
source = "git+https://github.com/an-anime-team/anime-game-core?tag=1.23.0#9db1b598418c8c973b4e3afbdc17dcacc8511f3f"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"bzip2",
|
||||
|
@ -106,7 +107,8 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "anime-launcher-sdk"
|
||||
version = "1.18.0"
|
||||
version = "1.19.0"
|
||||
source = "git+https://github.com/an-anime-team/anime-launcher-sdk?tag=1.19.0#18bbd738c9e941b76c1883a969cf9de87e724646"
|
||||
dependencies = [
|
||||
"anime-game-core",
|
||||
"anyhow",
|
||||
|
|
|
@ -330,16 +330,16 @@ impl SimpleComponent for App {
|
|||
let temp = config.launcher.temp.unwrap_or_else(std::env::temp_dir);
|
||||
|
||||
let mut downloaded = temp.join(game.file_name().unwrap()).metadata()
|
||||
.map(|metadata| Some(metadata.len()) == game.downloaded_size())
|
||||
.map(|metadata| Some(metadata.len()) >= game.downloaded_size())
|
||||
.unwrap_or(false);
|
||||
|
||||
if downloaded {
|
||||
for voice in voices {
|
||||
downloaded = !temp.join(voice.file_name().unwrap()).metadata()
|
||||
.map(|metadata| Some(metadata.len()) == voice.downloaded_size())
|
||||
downloaded = temp.join(voice.file_name().unwrap()).metadata()
|
||||
.map(|metadata| Some(metadata.len()) >= voice.downloaded_size())
|
||||
.unwrap_or(false);
|
||||
|
||||
if downloaded {
|
||||
if !downloaded {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -358,16 +358,16 @@ impl SimpleComponent for App {
|
|||
let temp = config.launcher.temp.unwrap_or_else(std::env::temp_dir);
|
||||
|
||||
let mut downloaded = temp.join(game.file_name().unwrap()).metadata()
|
||||
.map(|metadata| Some(metadata.len()) == game.downloaded_size())
|
||||
.map(|metadata| Some(metadata.len()) >= game.downloaded_size())
|
||||
.unwrap_or(false);
|
||||
|
||||
if downloaded {
|
||||
for voice in voices {
|
||||
downloaded = !temp.join(voice.file_name().unwrap()).metadata()
|
||||
.map(|metadata| Some(metadata.len()) == voice.downloaded_size())
|
||||
downloaded = temp.join(voice.file_name().unwrap()).metadata()
|
||||
.map(|metadata| Some(metadata.len()) >= voice.downloaded_size())
|
||||
.unwrap_or(false);
|
||||
|
||||
if downloaded {
|
||||
if !downloaded {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue