mirror of
https://git.um-react.app/um/um-react.git
synced 2026-11-28 08:06:59 +00:00
refactor: reorganize Kugou and Kuwo imports, add key management features
- Updated import paths for Kugou and Kuwo instructions to reflect new directory structure. - Introduced new key management functionalities for Kugou, including key import and selection logic. - Added comprehensive instructions for both Kugou and Kuwo key handling across various platforms. - Implemented Redux selectors for managing staging and production keys for Kugou and Kuwo. - Enhanced documentation and tests for new features and key management processes.
This commit is contained in:
1 parent
a9a937bc5e
commit
7a11d4f941
58 files changed
+522
-311
No files matched your search
@@ -0,0 +1,13 @@
|
||||
import { parseAndroidKuwoEKey, parseIosKuwoEKey } from '~/util/mmkv/kuwo';
|
||||
import type { StagingKWMv2Key } from './types';
|
||||
|
||||
/** Parse a Kuwo MMKV / iOS ekey dump into staging key rows (without `id`). */
|
||||
export async function importKWMv2KeysFromFile(file: File): Promise<null | Omit<StagingKWMv2Key, 'id'>[]> {
|
||||
if (/cn\.kuwo\.player\.mmkv/i.test(file.name)) {
|
||||
return parseAndroidKuwoEKey(new DataView(await file.arrayBuffer()));
|
||||
}
|
||||
if (/kw_ekey/.test(file.name)) {
|
||||
return parseIosKuwoEKey(new DataView(await file.arrayBuffer()));
|
||||
}
|
||||
return null;
|
||||
}
|
||||
Reference in new issue
Block a user