Remove iconv-lite calling
All checks were successful
continuous-integration/drone/pr Build is passing

This commit is contained in:
Yuki1536 2022-12-11 18:22:47 +09:00
parent 1fdab13ff8
commit 105023def7
Signed by untrusted user who does not match committer: Yuki1536
GPG Key ID: 86673EBBC510CD6C

View File

@ -1,6 +1,5 @@
import { parseBlob as metaParseBlob } from 'music-metadata-browser';
import { AudioMimeType, SniffAudioExt, GetArrayBuffer, GetMetaFromFile } from "./utils";
import { decode } from 'iconv-lite';
import { DecryptResult } from '@/decrypt/entity';
interface Handler {
@ -24,13 +23,6 @@ export async function Decrypt(file: File, raw_filename: string, raw_ext: string)
let musicBlob = new Blob([musicDecoded], { type: mime });
const musicMeta = await metaParseBlob(musicBlob);
for (let metaIdx in musicMeta.native) {
if (musicMeta.native[metaIdx].some(item => item.id === "TCON" && item.value === "(12)")) {
musicMeta.common.artist = decode(musicMeta.common.artist, "gbk");
musicMeta.common.title = decode(musicMeta.common.title, "gbk");
musicMeta.common.album = decode(musicMeta.common.album, "gbk");
}
}
const info = GetMetaFromFile(raw_filename, musicMeta.common.title, musicMeta.common.artist);