修复构建
This commit is contained in:
@@ -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) {
|
||||||
|
|||||||
@@ -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':
|
||||||
|
|||||||
@@ -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 ''
|
||||||
|
|||||||
Reference in New Issue
Block a user