mirror of
https://git.um-react.app/um/um-react.git
synced 2026-08-30 05:02:02 +00:00
feat(kgm): kgm v5 (aka. kgg) support
This commit is contained in:
@@ -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;
|
||||
}
|
||||
Reference in New Issue
Block a user