diff --git a/src/providers/modrinth.rs b/src/providers/modrinth.rs index b32166a..89b2830 100644 --- a/src/providers/modrinth.rs +++ b/src/providers/modrinth.rs @@ -38,7 +38,7 @@ struct VersionFiles { // file_type: String, filename: String, hashes: VersionHashes, - // primary: bool, + primary: bool, // size: i64, url: String, } @@ -177,6 +177,7 @@ impl Modrinth { source: package .files .iter() + .filter(|f| f.primary) .map(|f| FileSource::Download { url: f.url.clone(), sha1: f.hashes.sha1.clone(), diff --git a/src/resolver.rs b/src/resolver.rs index cc15286..624c25b 100644 --- a/src/resolver.rs +++ b/src/resolver.rs @@ -56,7 +56,7 @@ impl PinnedPackMeta { || download_side == DownloadSide::Client && m.1.client_side || download_side == DownloadSide::Server && m.1.server_side }) { - if let Some(filesource) = pinned_mod.source.first() { + for filesource in pinned_mod.source.iter() { match filesource { crate::providers::FileSource::Download { url,