Update qmccache.ts

This commit is contained in:
qq1010903229 2021-06-02 13:13:33 +08:00 committed by GitHub
parent afc1a84249
commit 92f39dc06a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 5 deletions

View File

@ -23,11 +23,8 @@ export async function Decrypt(file: Blob, raw_filename: string, raw_ext: string,
if (ext !== raw_ext) file = new Blob([buffer], {type: AudioMimeType[ext]})
else {
file = new Blob([buffer], {type: "application/octet-stream"})
if(raw_filename.endsWith(".mgg.cache")){
return QmcDecrypt(file, raw_filename, "mgg");
}else if(raw_filename.endsWith(".mflac.cache")){
return QmcDecrypt(file, raw_filename, "mflac");
}else throw "不支持的QQ音乐缓存文件格式" + raw_filename;
let ext = raw_filename.substring(file.name.lastIndexOf(".") + 1, file.name.length).toLowerCase();
return QmcDecrypt(file, raw_filename, ext);
}
}
const tag = await metaParseBlob(file);