@@ -111,10 +111,6 @@ const ProjectFetcherHOC = function (WrappedComponent) {
111111 }
112112 }
113113 fetchProject ( projectId , loadingState ) {
114- // pm: this is because im a lazy bum and i need to be able to access the project id
115- // if you hate it, then damn. fix it. im the backend dev. i aint dealing with this.
116- window . __currentProjectID = projectId ;
117-
118114 // tw: clear and stop the VM before fetching
119115 // these will also happen later after the project is fetched, but fetching may take a while and
120116 // the project shouldn't be running while fetching the new project
@@ -176,7 +172,8 @@ const ProjectFetcherHOC = function (WrappedComponent) {
176172 storage . DataFormat . JSON ,
177173 ) ;
178174 } else {
179- projectUrl = `https://projects.penguinmod.com/api/v1/projects/getprojectwrapper?safe=true&projectId=${ projectId } ` ;
175+ storage . setProjectID ( projectId ) ;
176+ projectUrl = `https://projects.penguinmod.com/api/v1/projects/getprojectwrapper?safe=true&projectId=${ projectId } &assets=false` ;
180177 assetPromise = progressMonitor
181178 . fetchWithProgress ( projectUrl )
182179 . then ( async ( r ) => {
@@ -202,20 +199,15 @@ const ProjectFetcherHOC = function (WrappedComponent) {
202199 let zip = new JSZip ( ) ;
203200 zip . file ( "project.json" , JSON . stringify ( json ) ) ;
204201
205- if ( typeof project . assets !== "object" ) {
206- alert (
207- "No assets were returned. This error is temporary and should not be reported." ,
208- ) ;
209- throw new TypeError (
210- "Invalid type given inside the assets list" ,
211- ) ;
212- }
202+ /*
203+ // we will fetch assets later now
213204 for (const asset of project.assets) {
214205 zip.file(
215206 asset.id,
216207 new Uint8Array(asset.buffer.data).buffer,
217208 );
218209 }
210+ */
219211
220212 const arrayBuffer = await zip . generateAsync ( {
221213 type : "arraybuffer" ,
@@ -367,7 +359,7 @@ const ProjectFetcherHOC = function (WrappedComponent) {
367359 } ;
368360 ProjectFetcherComponent . defaultProps = {
369361 assetHost :
370- "https://projects .penguinmod.com/api/v1/projects/backupassetget " ,
362+ "https://asset-cdn .penguinmod.com/file/penguinmod-warm-tier-s2-cf " ,
371363 projectHost : "https://projects.scratch.mit.edu" ,
372364 } ;
373365
0 commit comments