修复构建

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
+1 -1
View File
@@ -181,7 +181,7 @@ export const getLocalMusicFileLyric = async(path: string): Promise<LX.Music.Lyri
const { confidence, encoding } = detect(lrcBuf) const { confidence, encoding } = detect(lrcBuf)
console.log('lrc file encoding', confidence, encoding) console.log('lrc file encoding', confidence, encoding)
if (confidence > 0.8) { if (confidence > 0.8) {
const iconv = await import('iconv-lite') const iconv = (await import('iconv-lite')).default
if (iconv.encodingExists(encoding)) { if (iconv.encodingExists(encoding)) {
const lrc = iconv.decode(lrcBuf, encoding) const lrc = iconv.decode(lrcBuf, encoding)
if (lrc) { if (lrc) {
+1 -1
View File
@@ -14,7 +14,7 @@ export const saveLrc = async(lrcData: LX.Music.LyricInfo, info: {
downloadTlrc: boolean downloadTlrc: boolean
downloadRlrc: 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) const lrc = buildLyrics(lrcData, info.downloadLxlrc, info.downloadTlrc, info.downloadRlrc)
switch (info.format) { switch (info.format) {
case 'gbk': case 'gbk':
+2 -2
View File
@@ -304,7 +304,7 @@ export const createLocalMusicInfos = async(filePaths: string[]): Promise<LX.Musi
* @param isMerge 是否合并 * @param isMerge 是否合并
*/ */
export const exportPlayListToText = async(savePath: string, lists: Array<LX.List.MyDefaultListInfoFull | LX.List.MyLoveListInfoFull | LX.List.UserListInfoFull>, isMerge: boolean) => { 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) { if (isMerge) {
await saveStrToFile(savePath, await saveStrToFile(savePath,
@@ -328,7 +328,7 @@ export const exportPlayListToCSV = async(savePath: string,
lists: Array<LX.List.MyDefaultListInfoFull | LX.List.MyLoveListInfoFull | LX.List.UserListInfoFull>, lists: Array<LX.List.MyDefaultListInfoFull | LX.List.MyLoveListInfoFull | LX.List.UserListInfoFull>,
isMerge: boolean, isMerge: boolean,
header: string) => { header: string) => {
const iconv = await import('iconv-lite') const iconv = (await import('iconv-lite')).default
const filterStr = (str: string) => { const filterStr = (str: string) => {
if (!str) return '' if (!str) return ''