feat: 开屏广告 order=-1

This commit is contained in:
lisonge
2024-01-27 21:47:54 +08:00
parent 2e6a77e86b
commit 738a636c1f
2 changed files with 8 additions and 0 deletions

View File

@@ -90,6 +90,13 @@ 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);