feat(kgm): kgm v5 (aka. kgg) support

This commit is contained in:
鲁树人
2025-02-25 07:05:31 +09:00
parent acb7a634b1
commit c71078f5da
24 changed files with 553 additions and 39 deletions
+16
View File
@@ -0,0 +1,16 @@
import type { StagingKugouKey } from '~/features/settings/keyFormats';
import { MMKVParser } from '../MMKVParser';
export function parseAndroidKugouMMKV(view: DataView): Omit<StagingKugouKey, 'id'>[] {
const mmkv = new MMKVParser(view);
const result: Omit<StagingKugouKey, 'id'>[] = [];
while (!mmkv.eof) {
const audioHash = mmkv.readString();
const ekey = mmkv.readStringValue();
if (audioHash.length === 0x20 && ekey) {
result.push({ audioHash, ekey });
}
}
return result;
}