feat(joox): Fetch meta data from API

(cherry picked from commit 4af1a38334cfc51ce64dd509f2dff694f78010f6)
This commit is contained in:
鲁树人
2021-12-23 14:58:24 +00:00
parent 7fac4c60a5
commit 18a8dbfaa4
3 changed files with 191 additions and 33 deletions

View File

@@ -23,10 +23,12 @@ export async function Decrypt(file: Blob, raw_filename: string, raw_ext: string)
const ext = SniffAudioExt(musicDecoded);
const mime = AudioMimeType[ext];
const songId = raw_filename.match(/^(\d+)\s\[mqms\d*]$/i)?.[1];
const { album, artist, imgUrl, blob, title } = await extractQQMusicMeta(
new Blob([musicDecoded], { type: mime }),
raw_filename,
ext,
songId,
);
return {