feat: order -1

This commit is contained in:
lisonge 2024-01-27 21:50:06 +08:00
parent 738a636c1f
commit 03fc621cf9
2 changed files with 2 additions and 7 deletions

View File

@ -90,13 +90,6 @@ export const writeConfig = async (config: RawSubscription) => {
'utf-8', 'utf-8',
); );
newConfig.apps?.forEach((app) => {
app.groups?.forEach((g) => {
if (g.name.startsWith('开屏广告')) {
g.order = -1;
}
});
});
// update gkd.json // update gkd.json
const buffer = Buffer.from(orderdStringify5(newConfig, sortKeys), 'utf-8'); const buffer = Buffer.from(orderdStringify5(newConfig, sortKeys), 'utf-8');
await fs.writeFile(gkdFp, buffer); await fs.writeFile(gkdFp, buffer);

View File

@ -25,6 +25,8 @@ for await (const tsFp of walk(process.cwd() + '/src/apps')) {
appConfig.groups?.forEach((g) => { appConfig.groups?.forEach((g) => {
if (!g.name.startsWith('开屏广告')) { if (!g.name.startsWith('开屏广告')) {
g.enable = false; g.enable = false;
} else {
g.order = -1;
} }
}); });
rawApps.push(appConfig); rawApps.push(appConfig);