mirror of
https://hubproxy.babadafafafafa.cn/https://github.com/lyswhut/lx-music-desktop.git
synced 2026-09-20 08:04:00 +08:00
修复构建
This commit is contained in:
@@ -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) {
|
||||
|
||||
@@ -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':
|
||||
|
||||
@@ -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 ''
|
||||
|
||||
Reference in New Issue
Block a user