修复构建

This commit is contained in:
lyswhut
2025-12-12 12:52:31 +08:00
parent 6eb5ade9ea
commit e068103e4d
3 changed files with 4 additions and 4 deletions

View File

@@ -181,7 +181,7 @@ export const getLocalMusicFileLyric = async(path: string): Promise<LX.Music.Lyri
const { confidence, encoding } = detect(lrcBuf)
console.log('lrc file encoding', confidence, encoding)
if (confidence > 0.8) {
const iconv = await import('iconv-lite')
const iconv = (await import('iconv-lite')).default
if (iconv.encodingExists(encoding)) {
const lrc = iconv.decode(lrcBuf, encoding)
if (lrc) {

View File

@@ -14,7 +14,7 @@ export const saveLrc = async(lrcData: LX.Music.LyricInfo, info: {
downloadTlrc: boolean
downloadRlrc: boolean
}) => {
const iconv = await import('iconv-lite')
const iconv = (await import('iconv-lite')).default
const lrc = buildLyrics(lrcData, info.downloadLxlrc, info.downloadTlrc, info.downloadRlrc)
switch (info.format) {
case 'gbk':

View File

@@ -304,7 +304,7 @@ export const createLocalMusicInfos = async(filePaths: string[]): Promise<LX.Musi
* @param isMerge 是否合并
*/
export const exportPlayListToText = async(savePath: string, lists: Array<LX.List.MyDefaultListInfoFull | LX.List.MyLoveListInfoFull | LX.List.UserListInfoFull>, isMerge: boolean) => {
const iconv = await import('iconv-lite')
const iconv = (await import('iconv-lite')).default
if (isMerge) {
await saveStrToFile(savePath,
@@ -328,7 +328,7 @@ export const exportPlayListToCSV = async(savePath: string,
lists: Array<LX.List.MyDefaultListInfoFull | LX.List.MyLoveListInfoFull | LX.List.UserListInfoFull>,
isMerge: boolean,
header: string) => {
const iconv = await import('iconv-lite')
const iconv = (await import('iconv-lite')).default
const filterStr = (str: string) => {
if (!str) return ''