#11 Add Moo Music Format
This commit is contained in:
@@ -27,6 +27,8 @@ async function CommonDecrypt(file) {
|
||||
case "qmc0"://QQ Music Android Mp3
|
||||
case "qmcflac"://QQ Music Android Flac
|
||||
case "qmcogg"://QQ Music Android Ogg
|
||||
case "bkcmp3"://Moo Music Mp3
|
||||
case "bkcflac"://Moo Music Flac
|
||||
rt_data = await QmcDecrypt.Decrypt(file.raw, raw_filename, raw_ext);
|
||||
break;
|
||||
case "mflac"://QQ Music Desktop Flac
|
||||
|
@@ -11,24 +11,21 @@ const SEED_MAP = [
|
||||
[0x0e, 0x74, 0xbb, 0x90, 0xbc, 0x3f, 0x92],
|
||||
[0x00, 0x09, 0x5b, 0x9f, 0x62, 0x66, 0xa1]];
|
||||
|
||||
const OriginalExtMap = {
|
||||
"qmc0": "mp3",
|
||||
"qmc3": "mp3",
|
||||
"qmcogg": "ogg",
|
||||
"qmcflac": "flac",
|
||||
"bkcmp3": "mp3",
|
||||
"bkcflac": "flac"
|
||||
};
|
||||
|
||||
async function Decrypt(file, raw_filename, raw_ext) {
|
||||
// 获取扩展名
|
||||
let new_ext;
|
||||
switch (raw_ext) {
|
||||
case "qmc0":
|
||||
case "qmc3":
|
||||
new_ext = "mp3";
|
||||
break;
|
||||
case "qmcogg":
|
||||
new_ext = "ogg";
|
||||
break;
|
||||
case "qmcflac":
|
||||
new_ext = "flac";
|
||||
break;
|
||||
default:
|
||||
return {status: false, message: "File type is incorrect!"}
|
||||
if (!(raw_ext in OriginalExtMap)) {
|
||||
return {status: false, message: "File type is incorrect!"}
|
||||
}
|
||||
let new_ext = OriginalExtMap[raw_ext]
|
||||
const mime = util.AudioMimeType[new_ext];
|
||||
// 读取文件
|
||||
const fileBuffer = await util.GetArrayBuffer(file);
|
||||
|
Reference in New Issue
Block a user