Compare commits

...

2 Commits

Author SHA1 Message Date
MrSphay
20ff3453bc Update connected library install reason
All checks were successful
Codex Template Compliance / template-compliance (push) Successful in 8s
Build / build-windows (push) Successful in 32m47s
2026-05-16 14:13:14 +02:00
MrSphay
bff85c27b7 Use upstream pnpm package manager in Gitea build
Some checks failed
Codex Template Compliance / template-compliance (push) Successful in 7s
Build / build-windows (push) Failing after 29m7s
2026-05-16 13:42:45 +02:00
2 changed files with 7 additions and 3 deletions

View File

@@ -36,8 +36,6 @@ jobs:
- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 9.15.0
- name: Setup Rust
uses: dtolnay/rust-toolchain@stable

View File

@@ -2,6 +2,7 @@ use crate::pack::install_from::{CreatePack, CreatePackDescription};
use crate::pack::install_mrpack::install_zipped_mrpack_files;
use crate::profile;
use crate::state::ModLoader;
use crate::util::fetch::DownloadReason;
use crate::{ErrorKind, State};
use chrono::{TimeZone, Utc};
use serde::{Deserialize, Serialize};
@@ -259,6 +260,11 @@ pub async fn install(id: String) -> crate::Result<ConnectedPack> {
let state = State::get().await?;
let pack = get_by_id(&state.pool, &id).await?;
let bytes = fetch_mrpack(&pack.mrpack_url, &pack.sha512).await?;
let download_reason = if pack.profile_path.is_some() {
DownloadReason::Update
} else {
DownloadReason::Modpack
};
let profile_path = if let Some(profile_path) = &pack.profile_path {
profile_path.clone()
@@ -287,7 +293,7 @@ pub async fn install(id: String) -> crate::Result<ConnectedPack> {
},
};
install_zipped_mrpack_files(create_pack, true).await?;
install_zipped_mrpack_files(create_pack, true, download_reason).await?;
sqlx::query(
"