File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -47,6 +47,17 @@ class Storage extends ScratchStorage {
4747 die ,
4848 die ,
4949 ) ;
50+ this . addWebStore (
51+ [
52+ this . AssetType . ImageVector ,
53+ this . AssetType . ImageBitmap ,
54+ this . AssetType . Sound ,
55+ this . AssetType . Font ,
56+ ] ,
57+ this . getAssetBackupGetConfig . bind ( this ) ,
58+ die ,
59+ die ,
60+ ) ;
5061 }
5162 setProjectHost ( projectHost ) {
5263 this . projectHost = projectHost ;
@@ -71,6 +82,13 @@ class Storage extends ScratchStorage {
7182
7283 return `${ this . assetHost } /${ this . projectId } _${ asset . assetId } .${ asset . dataFormat } ` ;
7384 }
85+ getAssetBackupGetConfig ( asset ) {
86+ if ( ! this . projectId ) {
87+ return `https://assets.scratch.mit.edu/internalapi/asset/${ asset . assetId } .${ asset . dataFormat } /get/` ;
88+ }
89+
90+ return `https://projects.penguinmod.com/api/v1/projects/backupassetget?asset_name=${ this . projectId } _${ asset . assetId } .${ asset . dataFormat } ` ;
91+ }
7492 getScratchAssetGetConfig ( asset ) {
7593 return `https://assets.scratch.mit.edu/internalapi/asset/${ asset . assetId } .${ asset . dataFormat } /get/` ;
7694 }
You can’t perform that action at this time.
0 commit comments