Compare commits
No commits in common. "a0fe5d3f816396d586f443dfc5e881f6e374ee9d" and "440d0f505bf4390c3d70c46eea3ae6f3fb821fb9" have entirely different histories.
a0fe5d3f81
...
440d0f505b
3 changed files with 3 additions and 23 deletions
|
@ -234,8 +234,6 @@ fn extract_mod_config<R: Read + Seek>(archive: &mut ZipArchive<R>) -> Result<(Mo
|
||||||
None
|
None
|
||||||
};
|
};
|
||||||
|
|
||||||
tracing::debug!(?legacy_mod_data);
|
|
||||||
|
|
||||||
if let Some(name) = find_archive_file(archive, "dtmt.cfg") {
|
if let Some(name) = find_archive_file(archive, "dtmt.cfg") {
|
||||||
let mut f = archive
|
let mut f = archive
|
||||||
.by_name(&name)
|
.by_name(&name)
|
||||||
|
@ -268,24 +266,6 @@ fn extract_mod_config<R: Read + Seek>(archive: &mut ZipArchive<R>) -> Result<(Mo
|
||||||
|
|
||||||
Ok((cfg, root))
|
Ok((cfg, root))
|
||||||
}
|
}
|
||||||
} else if let Some((mod_id, resources, root)) = legacy_mod_data {
|
|
||||||
let cfg = ModConfig {
|
|
||||||
bundled: false,
|
|
||||||
dir: PathBuf::new(),
|
|
||||||
id: mod_id.clone(),
|
|
||||||
name: mod_id,
|
|
||||||
summary: "A mod for the game Warhammer 40,000: Darktide".into(),
|
|
||||||
version: "N/A".into(),
|
|
||||||
description: None,
|
|
||||||
author: None,
|
|
||||||
image: None,
|
|
||||||
categories: Vec::new(),
|
|
||||||
packages: Vec::new(),
|
|
||||||
resources,
|
|
||||||
depends: Vec::new(),
|
|
||||||
};
|
|
||||||
|
|
||||||
Ok((cfg, root))
|
|
||||||
} else {
|
} else {
|
||||||
eyre::bail!(
|
eyre::bail!(
|
||||||
"Mod needs a config file or `.mod` file. \
|
"Mod needs a config file or `.mod` file. \
|
||||||
|
|
|
@ -117,7 +117,7 @@ impl Api {
|
||||||
let Some(file) = files
|
let Some(file) = files
|
||||||
.files
|
.files
|
||||||
.into_iter()
|
.into_iter()
|
||||||
.find(|file| file.uploaded_timestamp == timestamp)
|
.find(|file| file.updated_timestamp == timestamp)
|
||||||
else {
|
else {
|
||||||
let err = Error::Custom("Timestamp does not match any file".into());
|
let err = Error::Custom("Timestamp does not match any file".into());
|
||||||
return Err(err);
|
return Err(err);
|
||||||
|
|
|
@ -77,13 +77,13 @@ pub struct File {
|
||||||
pub size: u64,
|
pub size: u64,
|
||||||
pub file_name: String,
|
pub file_name: String,
|
||||||
#[serde(with = "time::serde::timestamp")]
|
#[serde(with = "time::serde::timestamp")]
|
||||||
pub uploaded_timestamp: OffsetDateTime,
|
pub updated_timestamp: OffsetDateTime,
|
||||||
pub mod_version: String,
|
pub mod_version: String,
|
||||||
pub external_virus_scan_url: String,
|
pub external_virus_scan_url: String,
|
||||||
pub description: String,
|
pub description: String,
|
||||||
pub size_kb: u64,
|
pub size_kb: u64,
|
||||||
pub size_in_bytes: u64,
|
pub size_in_bytes: u64,
|
||||||
pub changelog_html: Option<String>,
|
pub changelog_html: String,
|
||||||
pub content_preview_link: String,
|
pub content_preview_link: String,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue