@@ -13,15 +13,15 @@ export default function setENV(name, platforms, database) {
1313 const { Settings, Caches, Configs } = getStorage ( name , platforms , database ) ;
1414 /***************** Settings *****************/
1515 if ( ! Array . isArray ( Settings ?. Types ) ) Settings . Types = Settings . Types ? [ Settings . Types ] : [ ] ; // 只有一个选项时,无逗号分隔
16- Console . info ( `typeof Settings: ${ typeof Settings } ` , `Settings: ${ JSON . stringify ( Settings ) } ` ) ;
16+ Console . info ( `typeof Settings: ${ typeof Settings } ` , `Settings: ${ JSON . stringify ( Settings , null , 2 ) } ` ) ;
1717 /***************** Caches *****************/
1818 if ( typeof Caches ?. Playlists !== "object" || Array . isArray ( Caches ?. Playlists ) ) Caches . Playlists = { } ; // 创建Playlists缓存
1919 Caches . Playlists . Master = new Map ( JSON . parse ( Caches ?. Playlists ?. Master || "[]" ) ) ; // Strings转Array转Map
2020 Caches . Playlists . Subtitle = new Map ( JSON . parse ( Caches ?. Playlists ?. Subtitle || "[]" ) ) ; // Strings转Array转Map
2121 if ( typeof Caches ?. Subtitles !== "object" ) Caches . Subtitles = new Map ( JSON . parse ( Caches ?. Subtitles || "[]" ) ) ; // Strings转Array转Map
2222 if ( typeof Caches ?. Metadatas !== "object" || Array . isArray ( Caches ?. Metadatas ) ) Caches . Metadatas = { } ; // 创建Playlists缓存
2323 if ( typeof Caches ?. Metadatas ?. Tracks !== "object" ) Caches . Metadatas . Tracks = new Map ( JSON . parse ( Caches ?. Metadatas ?. Tracks || "[]" ) ) ; // Strings转Array转Map
24- //Console.debug(`typeof Caches: ${typeof Caches}`, `Caches: ${JSON.stringify(Caches)}`);
24+ //Console.debug(`typeof Caches: ${typeof Caches}`, `Caches: ${JSON.stringify(Caches, null, 2 )}`);
2525 /***************** Configs *****************/
2626 Console . log ( "✅ Set Environment Variables" ) ;
2727 return { Settings, Caches, Configs } ;
0 commit comments