Upgrading (#354)

* fixed no download bug

* draft

* Working version

* minor improvements

* cicd fix

* merge conflicts

* fixed major merge confusion

* more conflicts, reformatting

* fixed random bugs found

* added second repair option to avoid confusion
This commit is contained in:
Wyatt Verchere
2023-07-26 20:33:03 -07:00
committed by GitHub
parent 70aaf6eef9
commit 21ae310f63
24 changed files with 817 additions and 306 deletions

View File

@@ -199,7 +199,7 @@ async fn import_atlauncher_unmanaged(
let game_version = atinstance.id;
let loader_version = if mod_loader != ModLoader::Vanilla {
crate::profile_create::get_loader_version_from_loader(
crate::profile::create::get_loader_version_from_loader(
game_version.clone(),
mod_loader,
Some(atinstance.launcher.loader_version.version.clone()),

View File

@@ -105,7 +105,7 @@ pub async fn import_curseforge(
let mod_loader = mod_loader.unwrap_or(ModLoader::Vanilla);
let loader_version = if mod_loader != ModLoader::Vanilla {
crate::profile_create::get_loader_version_from_loader(
crate::profile::create::get_loader_version_from_loader(
game_version.clone(),
mod_loader,
loader_version,

View File

@@ -75,7 +75,7 @@ pub async fn import_gdlauncher(
let loader_version = config.loader.loader_version;
let loader_version = if mod_loader != ModLoader::Vanilla {
crate::profile_create::get_loader_version_from_loader(
crate::profile::create::get_loader_version_from_loader(
game_version.clone(),
mod_loader,
loader_version,

View File

@@ -38,8 +38,10 @@ pub struct MMCInstance {
#[serde(deserialize_with = "deserialize_optional_bool")]
pub managed_pack: Option<bool>,
#[serde(rename = "ManagedPackID")]
pub managed_pack_id: Option<String>,
pub managed_pack_type: Option<MMCManagedPackType>,
#[serde(rename = "ManagedPackVersionID")]
pub managed_pack_version_id: Option<String>,
pub managed_pack_version_name: Option<String>,

View File

@@ -5,6 +5,7 @@ use serde::{Deserialize, Serialize};
use crate::{
prelude::ProfilePathId,
state::Profiles,
util::{fetch, io},
};
@@ -112,6 +113,10 @@ pub async fn import_instance(
.into());
}
}
// Check existing managed packs for potential updates
tokio::task::spawn(Profiles::update_modrinth_versions());
tracing::debug!("Completed import.");
Ok(())
}