feat: updated core library

This commit is contained in:
Observer KRypt0n_ 2023-03-05 22:43:33 +02:00
parent 824da89578
commit b1b3455f8e
6 changed files with 11 additions and 25 deletions

View file

@ -15,6 +15,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Fixed ### Fixed
- Forced `format_lang` to return regions for language codes - Forced `format_lang` to return regions for language codes
- Fixed titlebar behavior on some DEs
### Changed ### Changed

7
Cargo.lock generated
View file

@ -31,7 +31,7 @@ dependencies = [
[[package]] [[package]]
name = "anime-game-core" name = "anime-game-core"
version = "1.3.6" version = "1.3.7"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"bzip2", "bzip2",
@ -46,6 +46,7 @@ dependencies = [
"serde_json", "serde_json",
"sysinfo", "sysinfo",
"tar", "tar",
"thiserror",
"tracing", "tracing",
"xz", "xz",
"zip", "zip",
@ -863,9 +864,9 @@ checksum = "6c2141d6d6c8512188a7891b4b01590a45f6dac67afb4f255c4124dbb86d4eaa"
[[package]] [[package]]
name = "fs_extra" name = "fs_extra"
version = "1.2.0" version = "1.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2022715d62ab30faffd124d40b76f4134a550a87792276512b18d63272333394" checksum = "42703706b716c37f96a77aea830392ad231f44c9e9a67872fa5548707e11b11c"
[[package]] [[package]]
name = "futures" name = "futures"

@ -1 +1 @@
Subproject commit ca8d64906a8c8e21edb512552bbd89460ce37836 Subproject commit 9d6aeff5265999f724ff6caf288007a0756f1415

View file

@ -61,8 +61,6 @@ pub fn download_background() -> anyhow::Result<()> {
downloader.continue_downloading = false; downloader.continue_downloading = false;
if let Err(err) = downloader.download_to(crate::BACKGROUND_FILE.as_path(), |_, _| {}) { if let Err(err) = downloader.download_to(crate::BACKGROUND_FILE.as_path(), |_, _| {}) {
let err: std::io::Error = err.into();
anyhow::bail!(err); anyhow::bail!(err);
} }

View file

@ -312,8 +312,6 @@ impl SimpleAsyncComponent for DownloadComponentsApp {
installer.install(&config.game.wine.builds, move |update| { installer.install(&config.game.wine.builds, move |update| {
match &update { match &update {
InstallerUpdate::DownloadingError(err) => { InstallerUpdate::DownloadingError(err) => {
let err: std::io::Error = err.clone().into();
tracing::error!("Failed to download wine: {err}"); tracing::error!("Failed to download wine: {err}");
sender.output(Self::Output::Toast { sender.output(Self::Output::Toast {
@ -427,8 +425,6 @@ impl SimpleAsyncComponent for DownloadComponentsApp {
installer.install(&config.game.dxvk.builds, move |update| { installer.install(&config.game.dxvk.builds, move |update| {
match &update { match &update {
InstallerUpdate::DownloadingError(err) => { InstallerUpdate::DownloadingError(err) => {
let err: std::io::Error = err.clone().into();
tracing::error!("Failed to download dxvk: {err}"); tracing::error!("Failed to download dxvk: {err}");
sender.output(Self::Output::Toast { sender.output(Self::Output::Toast {

View file

@ -891,8 +891,6 @@ impl SimpleComponent for App {
tracing::debug!("Repairing: {}", file.path.to_string_lossy()); tracing::debug!("Repairing: {}", file.path.to_string_lossy());
if let Err(err) = file.repair(&config.game.path) { if let Err(err) = file.repair(&config.game.path) {
let err: std::io::Error = err.into();
sender.input(AppMsg::Toast { sender.input(AppMsg::Toast {
title: tr("game-file-repairing-error"), title: tr("game-file-repairing-error"),
description: Some(err.to_string()) description: Some(err.to_string())
@ -943,8 +941,6 @@ impl SimpleComponent for App {
})); }));
if let Err(err) = result { if let Err(err) = result {
let err: std::io::Error = err.into();
sender.input(AppMsg::Toast { sender.input(AppMsg::Toast {
title: tr("downloading-failed"), title: tr("downloading-failed"),
description: Some(err.to_string()) description: Some(err.to_string())
@ -1094,8 +1090,6 @@ impl SimpleComponent for App {
installer.install(&config.game.wine.builds, clone!(@strong sender => move |state| { installer.install(&config.game.wine.builds, clone!(@strong sender => move |state| {
match &state { match &state {
InstallerUpdate::DownloadingError(err) => { InstallerUpdate::DownloadingError(err) => {
let err: std::io::Error = err.clone().into();
tracing::error!("Downloading failed: {err}"); tracing::error!("Downloading failed: {err}");
sender.input(AppMsg::Toast { sender.input(AppMsg::Toast {
@ -1203,8 +1197,6 @@ impl SimpleComponent for App {
let result = diff.install_to_by(config.game.path, config.launcher.temp, clone!(@strong sender => move |state| { let result = diff.install_to_by(config.game.path, config.launcher.temp, clone!(@strong sender => move |state| {
match &state { match &state {
InstallerUpdate::DownloadingError(err) => { InstallerUpdate::DownloadingError(err) => {
let err: std::io::Error = err.clone().into();
tracing::error!("Downloading failed: {err}"); tracing::error!("Downloading failed: {err}");
sender.input(AppMsg::Toast { sender.input(AppMsg::Toast {
@ -1229,8 +1221,6 @@ impl SimpleComponent for App {
})); }));
if let Err(err) = result { if let Err(err) = result {
let err: std::io::Error = err.into();
tracing::error!("Downloading failed: {err}"); tracing::error!("Downloading failed: {err}");
sender.input(AppMsg::Toast { sender.input(AppMsg::Toast {