diff --git a/src/file.ts b/src/file.ts index 0e999a419..718e4312a 100644 --- a/src/file.ts +++ b/src/file.ts @@ -90,13 +90,6 @@ export const writeConfig = async (config: RawSubscription) => { 'utf-8', ); - newConfig.apps?.forEach((app) => { - app.groups?.forEach((g) => { - if (g.name.startsWith('开屏广告')) { - g.order = -1; - } - }); - }); // update gkd.json const buffer = Buffer.from(orderdStringify5(newConfig, sortKeys), 'utf-8'); await fs.writeFile(gkdFp, buffer); diff --git a/src/rawApps.ts b/src/rawApps.ts index cee4cda00..ff3307713 100644 --- a/src/rawApps.ts +++ b/src/rawApps.ts @@ -25,6 +25,8 @@ for await (const tsFp of walk(process.cwd() + '/src/apps')) { appConfig.groups?.forEach((g) => { if (!g.name.startsWith('开屏广告')) { g.enable = false; + } else { + g.order = -1; } }); rawApps.push(appConfig);