add name and nexusid to mod
This commit is contained in:
@@ -3,7 +3,7 @@ use log::error;
|
||||
|
||||
use crate::{
|
||||
nexus::{NXMUrl, download_nxm},
|
||||
types::RootConfig,
|
||||
types::{ModConfig, RootConfig},
|
||||
unpacker::unpack,
|
||||
};
|
||||
|
||||
@@ -32,11 +32,11 @@ pub fn handle_nxm(root_config: &mut RootConfig, raw_url: &str) -> anyhow::Result
|
||||
return Err(anyhow!("Mod with generated id already exists"));
|
||||
}
|
||||
|
||||
let new_mod = unpack(root_config, &mod_id, dl_file)?;
|
||||
unpack(root_config, &mod_id, dl_file)?;
|
||||
|
||||
let new_mod = ModConfig::from_mod_info(&mod_id, &mod_id, &mod_info);
|
||||
|
||||
root_config.add_mod(&new_mod);
|
||||
|
||||
root_config.save_to_file()?;
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user