Merge commit 'df1499047ccc8f39d756d5beba60651237aca1c0' into beta

This commit is contained in:
2025-08-10 19:54:24 +03:00
91 changed files with 9957 additions and 7832 deletions

View File

@@ -337,28 +337,26 @@ pub async fn update_project(
)
.await?
.remove(project_path)
&& let Some(update_version) = &file.update_version_id
{
if let Some(update_version) = &file.update_version_id {
let path = Profile::add_project_version(
profile_path,
update_version,
&state.pool,
&state.fetch_semaphore,
&state.io_semaphore,
)
.await?;
let path = Profile::add_project_version(
profile_path,
update_version,
&state.pool,
&state.fetch_semaphore,
&state.io_semaphore,
)
.await?;
if path != project_path {
Profile::remove_project(profile_path, project_path).await?;
}
if !skip_send_event.unwrap_or(false) {
emit_profile(profile_path, ProfilePayloadType::Edited)
.await?;
}
return Ok(path);
if path != project_path {
Profile::remove_project(profile_path, project_path).await?;
}
if !skip_send_event.unwrap_or(false) {
emit_profile(profile_path, ProfilePayloadType::Edited).await?;
}
return Ok(path);
}
Err(crate::ErrorKind::InputError(
@@ -479,10 +477,10 @@ pub async fn export_mrpack(
let included_export_candidates = included_export_candidates
.into_iter()
.filter(|x| {
if let Some(f) = PathBuf::from(x).file_name() {
if f.to_string_lossy().starts_with(".DS_Store") {
return false;
}
if let Some(f) = PathBuf::from(x).file_name()
&& f.to_string_lossy().starts_with(".DS_Store")
{
return false;
}
true
})
@@ -765,7 +763,7 @@ pub async fn try_update_playtime(path: &str) -> crate::Result<()> {
let updated_recent_playtime = profile.recent_time_played;
let res = if updated_recent_playtime > 0 {
// Create update struct to send to Labrinth
// Create update struct to send to labrinth
let modrinth_pack_version_id =
profile.linked_data.as_ref().map(|l| l.version_id.clone());
let playtime_update_json = json!({