feat: kwm v2 key import ui

This commit is contained in:
鲁树人
2023-06-17 02:45:31 +01:00
parent 5492628b71
commit b277000c2a
13 changed files with 480 additions and 32 deletions

View File

@@ -3,7 +3,7 @@ import { SQLDatabase, SQLStatic, loadSQL } from './sqlite';
export interface QMAndroidKeyEntry {
name: string;
key: string;
ekey: string;
}
export class DatabaseKeyExtractor {
@@ -33,10 +33,10 @@ export class DatabaseKeyExtractor {
}
const keys = db.exec('select file_path, ekey from `audio_file_ekey_table`')[0].values;
return keys.map(([path, key]) => ({
return keys.map(([path, ekey]) => ({
// strip dir name
name: getFileName(String(path)),
key: String(key),
ekey: String(ekey),
}));
} finally {
db?.close();