mirror of
https://git.um-react.app/um/um-react.git
synced 2025-11-28 03:23:02 +00:00
17 lines
511 B
TypeScript
17 lines
511 B
TypeScript
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;
|
|
}
|