From 105023def736705f90e2e85900bc0a1ef66a76e2 Mon Sep 17 00:00:00 2001 From: Yuki1536 <69851694+Yuki1536@users.noreply.github.com> Date: Sun, 11 Dec 2022 18:22:47 +0900 Subject: [PATCH] Remove iconv-lite calling --- src/decrypt/ximalaya.ts | 8 -------- 1 file changed, 8 deletions(-) diff --git a/src/decrypt/ximalaya.ts b/src/decrypt/ximalaya.ts index 918dc9d..5789f01 100644 --- a/src/decrypt/ximalaya.ts +++ b/src/decrypt/ximalaya.ts @@ -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);