From aa142b40581a6292802fd862667a49b643cf7574 Mon Sep 17 00:00:00 2001 From: Thomas Weber Date: Tue, 12 Oct 2021 15:02:28 -0500 Subject: [PATCH] Fix loading projects with duplicated assetId but differing md5ext --- src/packager/download-project.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/packager/download-project.js b/src/packager/download-project.js index 5a2896a..d1b7c08 100644 --- a/src/packager/download-project.js +++ b/src/packager/download-project.js @@ -188,7 +188,9 @@ const loadScratch3 = (projectData, progressTarget) => { const knownIds = new Set(); for (const i of assets) { - const id = i.assetId; + // Use md5ext instead of assetId because there are a few projects that have assets with the same + // assetId but different md5ext. (eg. https://scratch.mit.edu/projects/531881458) + const id = i.md5ext; if (knownIds.has(id)) { continue; }