mirror of
				https://github.com/WarrenHood/MCModpackManager.git
				synced 2025-11-04 01:58:41 +00:00 
			
		
		
		
	Only include primary mod file sources in lockfile for download
This commit is contained in:
		
							parent
							
								
									21ddcc1b52
								
							
						
					
					
						commit
						257d24e2e7
					
				| 
						 | 
					@ -38,7 +38,7 @@ struct VersionFiles {
 | 
				
			||||||
    // file_type: String,
 | 
					    // file_type: String,
 | 
				
			||||||
    filename: String,
 | 
					    filename: String,
 | 
				
			||||||
    hashes: VersionHashes,
 | 
					    hashes: VersionHashes,
 | 
				
			||||||
    // primary: bool,
 | 
					    primary: bool,
 | 
				
			||||||
    // size: i64,
 | 
					    // size: i64,
 | 
				
			||||||
    url: String,
 | 
					    url: String,
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					@ -177,6 +177,7 @@ impl Modrinth {
 | 
				
			||||||
            source: package
 | 
					            source: package
 | 
				
			||||||
                .files
 | 
					                .files
 | 
				
			||||||
                .iter()
 | 
					                .iter()
 | 
				
			||||||
 | 
					                .filter(|f| f.primary)
 | 
				
			||||||
                .map(|f| FileSource::Download {
 | 
					                .map(|f| FileSource::Download {
 | 
				
			||||||
                    url: f.url.clone(),
 | 
					                    url: f.url.clone(),
 | 
				
			||||||
                    sha1: f.hashes.sha1.clone(),
 | 
					                    sha1: f.hashes.sha1.clone(),
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -56,7 +56,7 @@ impl PinnedPackMeta {
 | 
				
			||||||
                || download_side == DownloadSide::Client && m.1.client_side
 | 
					                || download_side == DownloadSide::Client && m.1.client_side
 | 
				
			||||||
                || download_side == DownloadSide::Server && m.1.server_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 {
 | 
					                match filesource {
 | 
				
			||||||
                    crate::providers::FileSource::Download {
 | 
					                    crate::providers::FileSource::Download {
 | 
				
			||||||
                        url,
 | 
					                        url,
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in a new issue