From f6dd6935cd652474a06bcec4aef5fd64d1d0e542 Mon Sep 17 00:00:00 2001 From: Yuki1536 <69851694+Yuki1536@users.noreply.github.com> Date: Sun, 11 Dec 2022 17:54:07 +0900 Subject: [PATCH] Add x2m x3m decryptor --- src/decrypt/ximalaya.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/decrypt/ximalaya.ts b/src/decrypt/ximalaya.ts index 55664a7..918dc9d 100644 --- a/src/decrypt/ximalaya.ts +++ b/src/decrypt/ximalaya.ts @@ -32,7 +32,7 @@ export async function Decrypt(file: File, raw_filename: string, raw_ext: string) } } - const info = GetMetaFromFile(musicMeta.common.artist, musicMeta.common.title, raw_filename); + const info = GetMetaFromFile(raw_filename, musicMeta.common.title, musicMeta.common.artist); return { picture: "", @@ -48,7 +48,6 @@ export async function Decrypt(file: File, raw_filename: string, raw_ext: string) function ProcessX2M(data: Uint8Array) { const x2mHeaderSize = 1024; - // x2m Key in test format: ['x', 'm', 'l', 'y']; const x2mKey = new Uint8Array([0x78, 0x6D, 0x6C, 0x79]); let x2mScrambleTable = new Uint16Array(x2mHeaderSize); if (x2mScrambleTableBytes.length != 2 * x2mHeaderSize)